Error on Close Without Save

Susan in Houston

New Member
Joined
Jul 25, 2003
Messages
28
I've written a spreadsheet that sometimes causes an error that shuts down Excel when the model is closed without saving. It doesn't always cause an error on no-save closes and never causes this error when saved while closing. Any ideas?
 

Excel Facts

Excel Can Read to You
Customize Quick Access Toolbar. From All Commands, add Speak Cells or Speak Cells on Enter to QAT. Select cells. Press Speak Cells.
What's your s/s do and what's the error message? Running any code? Bit more info if you please!
 
Upvote 0
The model is a large workbook with 50+ sheets, a custom toolbar and numerous VB macros. There is an Auto-Close macro that removes the custom toolbar before closing.

The error message simply says "Microsoft Excel for Windows has encountered a problem and needs to close. We are sorry for the inconvenience." Then the usual submit to Microsoft babble.
 
Upvote 0
Sub Auto_Close()
On Error Resume Next
Call RemoveCustomMenu
End Sub

and, to answer your next question:

Sub RemoveCustomMenu()
On Error Resume Next
CommandBars("2004 Marketing Plan Menu").Delete
End Sub

I have this same code in other spreadsheets with no problems.
 
Upvote 0
Well, I followed through each of the links you posted and they appear to be dead ends.

For what it's worth, the first time I open Excel and close the file without saving, it generally works. If I reopen the file again and close again without saving, it seems to error on the 2nd and later attempts. I think I've seen it on other very large (3+ MB) spreadsheets as well. This leads me to believe it has something to do with available memory and is not specific to this model.
 
Upvote 0

Forum statistics

Threads
1,214,653
Messages
6,120,750
Members
448,989
Latest member
mariah3

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