Peter,
I only expect that instance of excel to be open at install time, but
even another instance exists, I think it's reasonable that the user
won't expect excel to reflect its changes until excel has to be
reloaded in memory. That's all cool and isn't what I'm seeing.
How do you know for certain that the AddinInstall event is running. My
script does add the addin, it just doesn't add my menu items for me.
I'm assuming that you set up some dummy project. If so, can I see it.
Aaron
Peter T wrote:
For me the AddinInstall event runs with your method.
Do you have any other instance of Excel open when you create your new
instance. If so, certain changes will only persist after closing the last
instance, and assuming changes were made in that instance.
Might be worth testing with GetObject (under On Error Resume Next) before
using CreateObject. This alone is not foolproof.
Regards,
Peter T
"Aragorn" wrote in message
oups.com...
dominicb,
I'm not quite sure what you mean, so I'll describe to you how I have it
set up. The vba project is saved as a .xla file. This xla contains a
VBA macro project with Sheet1, Sheet2, Sheet3, and ThisWorkBook as
objects. ThisWorkbook implements
Sub Workbook_AddinInstall()
The method adds several menu options and definitely runs when I manual
select it in excel. The script below never seems to result in the
AddinInstall method being run. I'm assuming that you're at least on
trace to some degree. I'm very new to all of this, so you're insite is
definitely helpful. Thanks.
dominicb wrote:
Good evening Aragorn
Just a shot in the dark, Aragorn, but the code you're using isn't by
any chance saved as an add-in is it (ie, with no worksheet visible)?
If it is, then that's the problem. Excel likes to have a worksheet
visible before it will allow a macro to start tinkering with the add-in
settings.
But if that's not the case then I don't know I'm afraid...
HTH
DominicB
--
dominicb
------------------------------------------------------------------------
dominicb's Profile:
http://www.excelforum.com/member.php...o&userid=18932
View this thread:
http://www.excelforum.com/showthread...hreadid=479551