Solved

Excel 2010 Unreadable Content error

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

Is Your Active Directory as Secure as You Think?

More than 75% of all records are compromised because of the loss or theft of a privileged credential. Experts have been exploring Active Directory infrastructure to identify key threats and establish best practices for keeping data safe. Attend this month’s webinar to learn more.

Question has a verified solution.

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

Suggested Solutions

How to quickly and accurately populate Word documents with Excel data, charts and images (including Automated Bookmark generation) David Miller (dlmille) Synopsis In this article you’ll learn how to use ExcelToWord! to copy data,charts, shapes …
This article descibes how to create a connection between Excel and SAP and how to move data from Excel to SAP or the other way around.
The viewer will learn how to create a normally distributed random variable in Excel, use a normal distribution to simulate the return on an investment over a period of years, Create a Monte Carlo simulation using a normal random variable, and calcul…
This Micro Tutorial will demonstrate how to create pivot charts out of a data set. I also added a drop-down menu which allows to choose from different categories in the data set and the chart will automatically update.

910 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

20 Experts available now in Live!

Get 1:1 Help Now