LinkBack Thread Tools Search this Thread Display Modes
Prev Previous Post   Next Post Next
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 349
Default Excel 2002 has encountered a problem and needs to close /Code Clea

I have an Excel 2002 workbook that intermittently gets the above error
message ("Excel 2002 has encountered a problem and needs to close") and
corrupts.

The workbook contains class modules, standard modules and userforms. Most
frequently the error message occurs when opening the workbook and clicking a
button on the userform that opens on entry (this button simply says €śexit€ť
and unloads the form). This isnt always the cause and sometimes may trigger
when updating links, or clicking on another button outside if the userform.
The spreadsheet is not shared, and is used my many users across a network (ie
only one person can have write access at any one time).

If I run Rob Boveys Code Cleaner against this workbook (once it has been
corrupted) on entering (before clicking any buttons) then it resolves the
problem. However a few days/weeks/months later the problem may re-occur
despite the fact that no new vba code has been added or edited. I was under
the impression that the code cleaner only cleans stuff from vba memory that
accumulates when new code is added? If this is true then how does it resolve
my problem if nothing has since accumulated (because I have added no new
code)?!

Is there some way for me to identify what the root cause for the problem is?
Does stuff accumulate in memory if perhaps I have not set variables to
nothing at the end of procedures for example?

Is there a way for me to run this code cleaner against a spreadsheet
automatically every time the spreadsheet is opened? The spreadsheet is very
critical and doesnt inspire user confidence if it crashes - this is the only
way I can think of to make sure the spreadsheet doesnt crash?!

HELP!

 
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
Microsoft Excel has encountered a problem and needs to close...... Des Excel Discussion (Misc queries) 0 February 5th 08 11:23 PM
Excel 2007 encountered a problem and needs to close donh Excel Discussion (Misc queries) 0 November 28th 07 06:10 PM
Microsoft Excel encountered a problem and needs to close tiller420 Excel Discussion (Misc queries) 0 February 22nd 07 06:46 PM
Microsoft Excel has encountered a problem and needs to close. HELP! LAF Excel Discussion (Misc queries) 2 April 3rd 06 01:57 PM
XL "encountered a problem & needs to close" Don Rouse Excel Programming 3 July 19th 05 09:34 PM


All times are GMT +1. The time now is 10:40 PM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
Copyright ©2004-2025 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"