View Single Post
  #4   Report Post  
Posted to microsoft.public.excel.programming
Jim Cone Jim Cone is offline
external usenet poster
 
Posts: 3,290
Default Excel has encountered a problem and needs...

Hi Greg,

"relatively large amount of code"
If you have individual modules greater than 64kb then you can have trouble.
If so, split up the code into additional modules.

You could also try...
1. exporting copies all of your forms to a file folder.
2. deleting your original forms.
3. importing the copied forms.

Even better...
After exporting all the forms, create a new workbook and start over.
Create all new modules by copying and pasting from Notepad.

Have you checked all of the forms for extra or unused controls?
That may sound dumb, but you will really feel dumb when you find some. <g
(I know)

Have you tried turning on "Break on All Errors" in the VBE and running your code?
That can sometimes result in surprises.

Regards,
Jim Cone
San Francisco, USA
http://www.realezsites.com/bus/primitivesoftware
(Excel Add-ins / Excel Programming)




"Greg Wilson"
wrote in message
I have a project with a relatively large amount of code. I now often get the
message: "Excel has encountered a problem and needs to close. We are sorry
for the inconvenience." I have used Rob Bovey's Code Cleaner several times to
no avail. I have no OLE objects in the project. It doesn't happen
often/reliably enough to try process of elimination, selectively commenting
out code and testing if it still happens. So I cannot source the problem.

I think it only happens after working on the code, and if I get it to go
away and don't do any more work on it, it may be OK. At least once, I made
the problem go away by just opening a code module and closing it without
making a single change. Weird?

Moday is the grand debut !!!
Hoping someone can provide a list of the usual suspects or has some good
suggestioins.
Much appreciative.
Greg