Addin Reference crashes Excel

G

Guest

I have a workbook "MyWB" that calls procedures in an Addin "MyAddin". I
established the reference from MyWB to MyAddin through the Tools | References
command. The VB project name of the Addin is "My_VBA_Addin". The code in
MyWB calls functions in the Addin with the statement

My_VBA_Addin.MyProc

As originally written, everything works fine. I can open, make changes to,
and save MyWB repeatedly, invoking calls to procedures in the Addin as
necessary.

I made some updates which required changes the Addin code and then
reinstalled it in Excel. The syntax for the procedure calls has not changed.

Now the FIRST time I open MyWB, I can make changes, call procedures in the
Addin, and save my changes without any trouble. The SECOND time I open MyWB,
I get the fatal file error that begins with the message, "Microsoft Office
has encountered a problem and needs to close." (It's the dialog box that
asks permission to send the error report to Microsoft.)

It's as though MyWB will only work with the EXACT original version of
MyAddin. ANY changes I make to the Addin cause the problem (e.g., changing a
single character). If I regenerate the original version of the Addin,
everything works fine again.

I am entirely stumped. Can anyone help?
 
R

RB Smissaert

If it is a large project (or maybe in any case) it is best to run after
every compile and save.
If you use it a lot it may be worth it to buy Andrew Baker's WB Rebuilder.
I think it is better than the CodeCleaner:
http://www.vbusers.com/commercial/Rebuild.asp
I use it all the time and definitely worth the £20.

RBS
 

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