Autorun Add-in

  • Thread starter Thread starter Todd Heiks
  • Start date Start date
T

Todd Heiks

How do i make my addin run when it is added to excel?
I want the user to browse to my addin and then have the addin build the
toolbar for itself.

Regards,
Todd
 
In the XLA's ThisWorkbook code module, put the code to build the menu:

Private Sub Workbook_Open()
' your code here
End Sub

Then, use BeforeClose to delete the menu:

Private Sub Workbook_BeforeClose(ByRef Cancel As Boolean)
' your code here
End Sub

Cordially,
Chip Pearson
Microsoft MVP 1998 - 2010
Pearson Software Consulting, LLC
www.cpearson.com
[email on web site]
 
Your add-in needs some Workbook_Open event code in Thisworkbook module or
Auto_Open code in a general module.

The code will build the Toolbar.

Don't forget to delete the Toolbar when the add-in closes.

See Debra Dalgleish's site for sample by Dave Peterson.

http://www.contextures.on.ca/xlToolbar02.html


Gord Dibben MS Excel MVP
 
I'll try it. Thanks.


Chip Pearson said:
In the XLA's ThisWorkbook code module, put the code to build the menu:

Private Sub Workbook_Open()
' your code here
End Sub

Then, use BeforeClose to delete the menu:

Private Sub Workbook_BeforeClose(ByRef Cancel As Boolean)
' your code here
End Sub

Cordially,
Chip Pearson
Microsoft MVP 1998 - 2010
Pearson Software Consulting, LLC
www.cpearson.com
[email on web site]



How do i make my addin run when it is added to excel?
I want the user to browse to my addin and then have the addin build the
toolbar for itself.

Regards,
Todd
 

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