Installing Add-In problem

M

mark

Hi.

I have an Add-In that I wrote, and within it, there are three subroutines.
To test it, I have a regular workbook, which calls each of the three
possiblities within the Add-in.

The first returns data to the activesheet, and always works.

The second returns a Pivot Cache, and always works.

The third takes an array of values, and returns data about each of the values.

The program line to set install the Add-In, is :

AddIns("IT Reports Add-In").Installed = True

for each of the three subroutines.

When I try to run the third one, it is giving me an error that says:

"Run-time error '-2147352565 (8002000b)':

The macro 'ITReportsAddin.xla!Auto_Add' cannot be found."

If I press the Debug button, change nothing, and continue the code, it works
fine.

If I manually pre-set the Add-In to be checked, it works fine.

It seemed like the Add-In might not be fully loading before trying to
continue, so I tried a DoEvents , and I tried giving it a loop to count for a
while... neither helped.

I don't want to leave the Add-In checked (which would let this work),
because then when people use their computers at home, where the Add-In is not
available (because it's on our network), Excel would give them the can't find
add-in error.

Can someone help me figure out what's happening, and how I can fix it?

Thanks,
Mark
 
T

Tim Zych

Hmm, if the addin is loaded properly and Auto_Add exists, it could be a
syntax error somewhere else that is throwing off the compiler. Make sure
everything compiles with Option Explicit at the top of every module, form,
etc, then Debug--> Compile.
 
M

mark

There is no Auto_Add subroutine, either in the module, or called.

It must be something that Excel is doing in the background when it tries to
install it.

The message references Auto_Add , but there is NOTHING in my code about it,
anywhere.
 
M

mark

I've discovered that Auto_Add was an event that fired when you installed an
Add-in, but from what I can tell, it applied to Excel 97. It was replaced by
the AddinInstall event in Office 2000, I think.

Why Auto_Add would be causing a problem in my workbook, I have no idea. I
run Excel 2003.
 
M

mark

I haven't found the problem, but I found a work-around.

The problem occurs if the Add-In is not installed, for one of three routines.

So, I tried putting the Applications.Addins().Intsalled = True command in
the workbooks Open event, and also uninstalled it in the before_close event.

This works, though I'd still like to know what the problem is.
 

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