ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Programming (https://www.excelbanter.com/excel-programming/)
-   -   Menu Issues when creating an Add-in (https://www.excelbanter.com/excel-programming/322542-menu-issues-when-creating-add.html)

ExcelMonkey[_190_]

Menu Issues when creating an Add-in
 
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

Tom Ogilvy

Menu Issues when creating an Add-in
 
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.

--
Regards,
Tom Ogilvy

"ExcelMonkey" wrote in message
...
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





All times are GMT +1. The time now is 08:56 PM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
ExcelBanter.com