SaveAs - user pushing cancel corrupts the file

S

slankc

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
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Similar Threads

Case Event 2
Save As Then Replace Bombs Out 2
Failure at File Save 2
Before Save 1
SaveAs dialog box 1
GetSaveAsFilename X & ActiveWorkbook.SaveAs X 2
SaveAs Problem 7
GetSaveasFileName 1

Top