ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Programming (https://www.excelbanter.com/excel-programming/)
-   -   Custom Menu Item specific to a workbook (https://www.excelbanter.com/excel-programming/288940-custom-menu-item-specific-workbook.html)

Tommy T

Custom Menu Item specific to a workbook
 
Hey guys,
I discovered an old macro at work. It looks like the macro was written as a worksheet, b/c I get the message that macros are now edited in the VBE. When this workbook is opened, a custom menu item(which is assigned to run the macro)appears under 'Tools'. I looked at the code and it only shows code for the macro - nothing about a custom menu item.

How is this menu item being opened? Can I do this with some of my other macros? I know I can put a custom menu item, but it stays there all the time, and it is only on my computer.

Thanks,
TT

Gord Dibben

Custom Menu Item specific to a workbook
 
Tommy

In versions prior to Excel 97 there was the Menu Editor which allowed you to
make custom menu items specific to that workbook.

Sounds like this is your case.

This feature was taken out starting with Excel 97.

You can now create menu items for each workbook "on the fly" by using code to
build the items when the workbook opens or is activated and deleted upon the
reverse.

For more on this see

http://support.microsoft.com/support.../Q159/6/19.asp

http://support.microsoft.com/default...EN-US;Q166755&

For info on "attaching" toolbars to a workbook see

http://www.microsoft.com/exceldev/articles/toolbatt.htm

Gord Dibben Excel MVP

On Fri, 23 Jan 2004 09:51:07 -0800, "Tommy T"
wrote:

Hey guys,
I discovered an old macro at work. It looks like the macro was written as a worksheet, b/c I get the message that macros are now edited in the VBE. When this workbook is opened, a custom menu item(which is assigned to run the macro)appears under 'Tools'. I looked at the code and it only shows code for the macro - nothing about a custom menu item.

How is this menu item being opened? Can I do this with some of my other macros? I know I can put a custom menu item, but it stays there all the time, and it is only on my computer.

Thanks,
TT




All times are GMT +1. The time now is 07:51 PM.

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