Hi everyone,
I have an Excel workbook that's created by running some VBA.
Whenever i save the file and reopen it, there occurs an error:
"Excel was able to open the file by repairing or removing the unreadable content.
Repaired Part: /xl/worksheet/sheet31.xml-Part."
The file does get repaired and I can see from the repaired log which sheet is the problem (i.e. Sheet31).
The only macro within this sheet is the following:
The code is working normal as it should and i don't see a problem.
Is there a way to resolve my problem?
Thanks a lot
Julia
I have an Excel workbook that's created by running some VBA.
Whenever i save the file and reopen it, there occurs an error:
"Excel was able to open the file by repairing or removing the unreadable content.
Repaired Part: /xl/worksheet/sheet31.xml-Part."
The file does get repaired and I can see from the repaired log which sheet is the problem (i.e. Sheet31).
The only macro within this sheet is the following:
VBA Code:
Sub Sheet 31()
'
' Sheet 31
'
'
Rows("3:120000").Select
Selection.ClearContents
Columns("A:A").Select
Selection.ClearContents
Range("A1").Select
Sheets("Sheet 1").Select
Columns("B:B").Select
Selection.Copy
Sheets("Sheet 31").Select
Range("A1").Select
Selection.PasteSpecial Paste:=xlPasteValues, Operation:=xlNone, SkipBlanks _
:=False, Transpose:=False
Application.CutCopyMode = False
ActiveSheet.Range("$A$1:$A$120000").RemoveDuplicates Columns:=1, Header:= _
xlYes
Range("A1").Select
Dim lastrow As Long
lastrow = WorksheetFunction.Count(Range("A:A"))
Range("B2:X2").Select
Selection.Copy
ActiveSheet.Range("B3:X" & lastrow + 1).Select
Selection.PasteSpecial Paste:=xlPasteFormulas, Operation:=xlNone, _
SkipBlanks:=False, Transpose:=False
Application.CutCopyMode = False
Range("A1").Select
End Sub
The code is working normal as it should and i don't see a problem.
Is there a way to resolve my problem?
Thanks a lot
Julia