PDA

View Full Version : Solved: Auto_Open Query



markh1182
06-05-2007, 06:57 AM
Hi, I have created an add-in with an Auto_Open in that runs fine. However we have a second add-in that either has an auto_open or Auto_exec macro, but the two add-ins don't both work, only one does.

Is it actually possible to run 2 auto_opens from different add-ins and be able to get them both to run? The reason I ask is that one of the add-ins is a 3rd party one that is password protected so I can't gain access to it at the moment.

lucas
06-05-2007, 08:05 AM
can you post your auto_Open code and tell us where you're putting it?
and why are you using auto open instead of workbook open?

Oorang
06-05-2007, 08:12 AM
To my knowledge there is no limitation of the number of Auto_Opens that can run. They all trigger when the add-in opens. And the add in opens when the application is started. I suspect your problem lies elsewhere. It could be a few things. Not all addins "Play nice" with each other. The most common thing I have seen with add-ins that use menu systems, is that they are loading their own controls they "clean up" old tool bars so if an instance of a control is already loaded the user doesn't have two.
Many time this is done is suboptimum ways. A few common mistakes are using the Reset method, this does indeed put the host bar in it's default state, but will nuke everyone elses additions. Deleting by Control Index, works fine until someone else inserts their control before yours, Etc, Etc.

markh1182
06-05-2007, 08:57 AM
looks like I have worked out why this wasn't working.

Seems to be because I had a .Reset in my code and I hadn't saved the add-in in the correct place to load it correctly in Excel afterwards so it could be used.

Will let you know if I have any further trouble.