Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.excel.programming
|
|||
|
|||
CommandBarControl control question when using template
I have a template which contains a macro, and I added a Custom Menu Item to
the Standard toolbar to execute the macro. But when a new workbook is created using the template, the new menu item cannot execute the macro. I know it has to do with the new workbook not having the same name as the template, but I can't figure out how to have the menu item point to the macro in the new workbook rather than the template workbook. I.e. In the custom menu item named 'Compare BOMs' in the template I set Assign Macro... to 'CompareBOMs'. When I look at the Assign Macro... again, I see that it is set to 'CompareVBDWBOMs.xlt!CompareBOMs'. I then save the template and create a new workbook with it. Now, Assign Macro... is set to 'CompareVBDWBOMs1!CompareBOMs' and clicking the 'Compare BOMs' menu item says the macro 'CompareVBDWBOMs1!CompareBOMs' cannot be found. The macro 'CompareBOMs' is in the ThisWorkbook object. |
Thread Tools | Search this Thread |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
CommandBarControl object | Excel Discussion (Misc queries) | |||
Late Binding for Excel CommandBar and CommandBarControl | Excel Programming | |||
CommandBarControl ID | Excel Programming | |||
CommandBarControl, Exists??? | Excel Programming | |||
CommandBarControl class | Excel Programming |