Worksheet Crashing Excel

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!
 
O

OssieMac

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.
 
S

Shane

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?
 
O

OssieMac

Hi Shane,

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

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

Top