Solved

Excel 2010 Unreadable Content error

Posted on 2011-09-28
5
510 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
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 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

Industry Leaders: 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

When you see single cell contains number and text, and you have to get any date out of it seems like cracking our heads.
This article describes how you can use Custom Document Properties to store settings and other information in your workbook so that they will be available the next time you open the workbook.
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 demonstrates how to create Excel charts: column, area, line, bar, and scatter charts. Formatting tips are provided as well.

615 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