Worksheet Crashing Excel

  • Thread starter Thread starter Shane
  • Start date Start date
S

Shane

I know that this is going to be rather generic, but I have a macro enabled
file that I created in excel 2007 (saved in 2003 format) that works great,
but when I try to close the file, it ALWAYS asks if I want to save the
changes (even if I JUST saved) and then whether I choose to save or not, it
crashes excel.

I know that you don't know what my code is, but is anyone aware of this
happening, or a good place to start looking in my code to fix errors? I
would have no problem posting code if needed... I am frustrated and lost...

Thanks in advance for any help!
 
Hi Shane,

Do you have a Workbook_BeforeClose event sub in ThisWorkbook module? If so,
try the following.

Place Exit Sub as the first line of code after the sub name and save the
workbook. (Effectively disables the sub).

Test closing the workbook. If this fixes the problem then post the code you
have in this sub.
 
As I go and work with this sheet again, I notice that if I do not pull up the
userform, it closes ok.

Would keeping the userform hidden (I have it just hide when not using the
form, not unloading) make this happen?
 
Hi Shane,

In that case I would try closing it in the Workbook_BeforeClose event and
see whant happens.
 
Back
Top