0
votes

After i do this things in Excel 2013

strSaveName = ThisWork.Path & "\" & strExt & ".xlsx"
.SaveAs strSaveName, FileFormat:=51

Excel gives the following error when opening this xlsx file: "Excel found unreadable content in 'newFile.xlsx'. Do you want to recover the contents of this workbook? If you trust the source of this workbook, click Yes."

Once I click Yes, I receive the following notice: "Excel was able to open the file by repairing or removing the unreadable content. Removed Part: /xl/drawings/vmlDrawing1.vml part. (Drawing shape)"

Also all coments being deleted.

if i save in another format

strSaveName = ThisWork.Path & "\" & strExt & ".xls"
.SaveAs strSaveName, FileFormat:=56

everithing goes ok instead warning about not supported formulas in excel 2003

How to fix that and save file as xlsx ?

1
Have you tried without fileformat?findwindow
Yes, i tryed .SaveAs strSaveName, 51 and error the sameDmitrij Holkin
lol I meant without that argument at all. Just .SaveAs strSaveNamefindwindow
Yes, everething the same errorDmitrij Holkin
Hmm you must have some data that is ancient or not compatible XDfindwindow

1 Answers

1
votes

try run this code on your original file

Dim objcomment As Comment

    For Each objcomment In ActiveSheet.Comments
        With objcomment.shape
            .top = objcomment.Parent.top
            .Visible = False
        End With
    Next