Repaired Part: /xl/worksheet/sheet31.xml-Part

jm2810

New Member
Joined
Feb 23, 2023
Messages
1
Office Version
  1. 2019
Platform
  1. Windows
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:
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
 

Excel Facts

Save Often
If you start asking yourself if now is a good time to save your Excel workbook, the answer is Yes
The XML for a sheet does not contain any of its VBA so I doubt that is the issue.
 
Upvote 0

Forum statistics

Threads
1,223,904
Messages
6,175,295
Members
452,632
Latest member
jladair

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top