Solved

Excel 2010 Unreadable Content error

Posted on 2011-09-28
5
504 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

What Security Threats Are You Missing?

Enhance your security with threat intelligence from the web. Get trending threat insights on hackers, exploits, and suspicious IP addresses delivered to your inbox with our free Cyber Daily.

Join & Write a Comment

Suggested Solutions

Title # Comments Views Activity
excel file 5 47
Excel file merge 2 cells with line break 2 23
Add macros on Open 9 32
Formula to convert ranked data 2 11
A little background as to how I came to I design this code: Around 5 years ago I designed an add-in that formatted Excel files to a corporate standard, applying different cell colours and font type depending on whether the cells contained inputs,…
Introduction This Article is a follow-up to my Mappit! Addin Article (http://www.experts-exchange.com/A_2613.html), it was inspired by an email posting I made to EUSPRIG (http://www.eusprig.org/index.htm), I will briefly cover: 1) An overvie…
The viewer will learn how to simulate a series of coin tosses with the rand() function and learn how to make these “tosses” depend on a predetermined probability. Flipping Coins in Excel: Enter =RAND() into cell A2: Recalculate the random variable…
This Micro Tutorial will demonstrate in Google Sheets how to use the HYPERLINK function to create live links inside your spreadsheet.

758 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

Need Help in Real-Time?

Connect with top rated Experts

21 Experts available now in Live!

Get 1:1 Help Now