Addin - XLA Question how too

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

I am trying to store code in a second file to keep file bloat down. I have
created a file called ia.xla in which I have stored many code snippets used
across hundreds of file.

I would like ia.xla to start when a second workbook is opened. I have tried
the following code but can’t seem to get it to work.

Set objTemp = Application.AddIns.Add( “C:\temp\ia.xlaâ€, False)

Also note: I can’t change the install on the machines so I can’t put the
file in a xl startup file. I must start xla file when the calling xl
workbook opens. I would also like to hide the workbook on open.

The only way I can launch the addin file is to call a procedure from the file:

Application.Run " C:\temp\ia.xla!IAGeneral.hello" but this does not hide
the workbook

Any thoughts would be appreciated.

Regards,

Stewart Rogers
 
I think you have named your file .xla and it is actually an xls. You also
need to change the isaddin property of the workbook to True. A true addin
won't be visible when it is opened.

In the workbook_open event of the second workbook, just do

workbook.Open "C:\temp\ia.xla"
 

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

Back
Top