View Single Post
  #1   Report Post  
Posted to microsoft.public.excel.programming
dranon dranon is offline
external usenet poster
 
Posts: 14
Default Excel just dies - XL97

I have a button on the first of 30 worksheets which does a lot of work
behind the scenes: deleting worksheets, populating cells, creating new
worksheets.

Most of the time, but not frequently enough, it runs flawlessly.

But every once in a while it will start the process, delete all the
worksheets it is supposed to delete, create a lot of the sheets it is
supposed to create and then, near the end of the process, before it
has completed 100% of the sheets it is supposed to create, it just
stops dead in its tracks. In order to recover I have to go into VBA
(alt-11) and enter a "application.screenupdating = true" command into
the immediate window.

However, while the above gives me access to my excel workbooks again,
the button will now continually fail until I close all open workbooks,
completely exit excel and fire everything back up again.

When I say it fails, it fails the same way as the first failu it
deletes and creates most of the worksheets and then it just dies. I
didn't mean to say that the button doesn't do anything. It does. And
all my message boxes run properly, too.

Since I routinely have 10 or more workbooks open at once, I'd really
like to figure out a way for me to be able to run the routines
associated with the command button again without having to restart
Excel.

Yes, I have tried just shutting down the offending workbook and
calling it up again. No go. In fact, I've closed down all workbooks
and called up the offending workbook and it still fails. Only
restarting Excel seems to work.

Any idea how to go about testing this?