Solved

Excel 2010 Unreadable Content error

Posted on 2011-09-28
5
508 Views
Last Modified: 2012-05-12
Excel 2010 SP 1. Windows 7.

I have a workbook that was originally created on XP machine with either Office 2007 or 2003.

The workbook has this macro that adds a row to the spreadsheet and then sorts the rows:

 
Sub AddRow()
'
' AddRow Macro
    ActiveWorkbook.Worksheets("Sheet1").Sort.SortFields.Add Key:=Range("A3:A200") _
        , SortOn:=xlSortOnValues, Order:=xlAscending, DataOption:=xlSortNormal
    With ActiveWorkbook.Worksheets("Sheet1").Sort
        .SetRange Range("A3:AZ200")
        .Header = xlNo
        .MatchCase = False
        .Orientation = xlTopToBottom
        .SortMethod = xlPinYin
        .Apply
    End With
    Rows("2:2").Select
    Selection.Copy
    Selection.Insert Shift:=xlDown
    Rows("3:3").Select
    Selection.Locked = True
    Rows("3:3").Select
    Selection.Locked = False
    Selection.FormulaHidden = False
    Rows("3:3").RowHeight = 27
    Range("A3").Select
    Application.CutCopyMode = False
    
End Sub

Open in new window


I run the macro, everything works fine, I save and close the file.

When I reopen the file, I get this:

 Error
I click "Yes" and then get this:

 Repairs
I click on the "view log file" link and get this:

 Log File
When I save, close, and reopen, everything works fine again. I can reopen the file without problems. But, once I run the macro, save, and close, then the error comes back.

Thanks.
0
Comment
Question by:carlosab
  • 3
5 Comments
 
LVL 12

Expert Comment

by:viralypatel
ID: 36715850
0
 

Author Comment

by:carlosab
ID: 36715858
Thanks viarly,

I had reviewed that kb article, but don't know how to "remove the expressions from all Current Time Member properties" and it doesn't tell me.
0
 
LVL 19

Expert Comment

by:regmigrant
ID: 36900900
I have had this when I save a Pivot table created by earlier version of excel in 2010 back to the original format. The only solution I've found is to delete and recreate the pivot table and save in native 2010 format. I *think* this would result in removing the Current Time properties mentioned in the article but as I dont use the analysis tools mentioned I wouldnt know
Reg
0
 

Accepted Solution

by:
carlosab earned 0 total points
ID: 36901035
I added .SortFields.Clear to the end of my sort code and that appears to have resolved the problem.
0
 

Author Closing Comment

by:carlosab
ID: 36929462
My comment is the solution.
0

Featured Post

Technology Partners: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Excel can be a tricky bit of software to get your head around. Whilst you’ll be able to eventually get to grips with the basic understanding of how to get by, there are a few Excel tips that not everybody will even know about let alone know how to d…
Do you use a spreadsheet like Microsoft's Excel?  Have you ever wanted to link out to a non excel file on your computer or network drive?  This is the way I found to do it!
This Micro Tutorial will demonstrate in Google Sheets how to use the HYPERLINK function to create live links inside your spreadsheet.
This Micro Tutorial demonstrates in Microsoft Excel how to consolidate your marketing data by creating an interactive charts using form controls. This creates cool drop-downs for viewers of your chart to choose from.

685 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question