ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Programming (https://www.excelbanter.com/excel-programming/)
-   -   SaveAs - user pushing cancel corrupts the file (https://www.excelbanter.com/excel-programming/359501-saveas-user-pushing-cancel-corrupts-file.html)

slankc

SaveAs - user pushing cancel corrupts the file
 
I have a spreadsheet that has a lot of pivot tables, (~10 M). Early versions
of it run fine, but if I Cancel the SaveAs dialog box, the file becomes
corrupted.
After cancelling Save As, Excel crashes everytime I try to update a pivot
table.
I have recreated the file twice. It always works until I push Cancel

Is there something I'm supposed to be doing that I'm not?


savemsg = MsgBox("Please provide a new name for the Summary Mail file.
Please do not push Cancel", vbInformation, SaveAs)

fname = Application.GetSaveAsFilename

If fname < False Then
ActiveWorkbook.SaveAs Filename:=fname
End If

Thanks


All times are GMT +1. The time now is 04:30 AM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
ExcelBanter.com