Menu Issues when creating an Add-in

  • Thread starter Thread starter ExcelMonkey
  • Start date Start date
E

ExcelMonkey

I have just created an auditing tool for Excel. It is a
spreadsheet which opens up and has its own menu. I now
want to covert it into an Excel Add-in. However I am not
clear what changes, if any, need to be made to my menu
creation code.

In the xls version, I have a Workbook_Open event that
creates the menu and a Workbook_Close Event that Deletes
the menu. If I now covert it to an xla file(Add-in), does
Excel treat it as an open file? Will it always display my
menu? That is, once clicked as an Add-in, will the menu
deletion code that I have in my Workbook_Close event
become redundant?

Is there anything I should know before converting this to
an xla file?

Thank-you
 
The workbook_open event fires when the addin is opened. The
workbook_beforeclose event fires when you unload the addin (which could be
when Excel is closing). So you shouldn't need to do anything special.

With the addin loaded, go to the immediate window and type

? workbooks("MyAddin.xls").Name

to demonstrate that the addin is loaded event though it is not formally in
the workbooks collection.
 

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