Excel has encountered a problem and needs...
Thanks Jim for responding. The error happens on opening the wb. AutoRecover
saves a version minus all the code!!! This happens only occasionally. Only
opening the wb with macros disabled and then either running Code Cleaner or
even just opening and closing the VBE makes it go away (the latter may not be
reliable).
I think your suggestions are the way to go. I was ultimately planning to
rebuild the whole thing once the final version was complete. Tomorrow, it
needs to be put into service, but only needs to be a good prototype version.
1. My largest module is a UF module and is 45 kb.
2. When creating complex UF's as in this case, I write a macro that creates
the controls programmatically to avoid the problem you mentioned plus others.
So there can't be any controls I'm not aware of. The main UF is as clean as a
whistle structurally.
3. I checked out "Break on All Errors". It triggers a whole slew of
expected errors in any addins plus the project, such as:
"On Error Resume Next"
Application.CommandBars("XYZ").Delete 'which may or may not exist
On Error GoTo 0
I unselected all addins and tested it. I found only one intentional error
similar to the above example. But this was when the problem was not
occurring. I will keep "Break on All Errors" set and see what happens.
4. All the above said, I still think there's some garbage somewhere that
rebuilding may fix. I will try your suggestion of exporting the forms,
deleting the originals and importing the copied forms. I though Code Cleaner
did similar though.
Thanks again.
Greg
|