Excel Menu Manager
Christopher Rath
2006-10-22
Menu Manager Skeleton
This menu manager skeleton provides a starting point for a new Add-In to
be created, where that Add-In will place itself on the menu bar and also
create a toolbar button.
Installation Instructions
The following steps are a attempt to describe
the complete process followed to use this skeleton in creation of an Excel
Add-In.
- Create a new Excel workbook.
- Save the workbook, giving it the name your final Add-In .xla file
should have, except this version is saved as an .xls file (I also put
the word "template" in the filename to make it very clear that this is
not the final Add-In).
- Copy the Prod and EventClass modules into the new workbook.
- Copy the "ThisWorkbook" code into the new workbook.
- Set the constant values:
- AddInNm - Name of your Add-In; this will be used to create a
Windows Registry entry.
- CmdBarNm - The name you will give the toolbar embeded within
your Add-In.
- ButtonNm - The name you will give the toolbar button that
invokes your Add-In.
- MyMenuNm - The short name you will give the menu item that
the Add-In places on the "My..." menu (this name is not seen by the
user).
- MyMenuCaption - The text that will appear as the menu item.
- MyMenuOnAction - The VBA macro to be called when the menu
item is selected.
- Add your code to this Prod module.
- Create a button bar and button for your Add-In.
- Attach the button bar to the new workbook.
- Save the new workbook.
- Lastly, perform a Save As, choosing the file type as an Excel
Add-In, giving it the final name you want for the Add-In.
- Close the workbook.
- Delete the Add-In's button bar (Tools->Customize, choose the
toolbar and the press [Delete]).
- Restart Excel, and then load the Add-In (Tools->Add Ins...).
- Test the Add-In.
Skeleton Add-In
The Add-In can be downloaded from
here. The instructions above are also embedded within the Prod VBA
module.
Copyright & Licensing
Note, the menu manager skeleton is Copyright ©2006 Christopher Rath.
Permission is granted for any use of this skeleton by others as long as this copyright statement
is retained, other due and proper credit is provided to the author (e.g., don't claim you wrote
this template), and the LGPL license is respected. This package is free software; you
can redistribute it and/or modify it under the terms of version 2.1 of the GNU
Lesser General Public License as published by the Free Software Foundation. See the LGPL
license on the GNU.org website. This package is distributed in the
hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE; on an “AS IS,” “WHERE IS” and “WITH ALL
FAULTS” basis.
©Copyright 2006, Christopher Rath
Telephone: 613-824-4584
Address: 555 Wilbrod St., Unit 602, Ottawa, ON Canada K1N 5R4
Last updated:
2021/11/25 @ 21:56:54 (
)