Home |
Search |
Today's Posts |
|
#1
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
Created a custom toolbar for a template using the customize command. Assign
each button in the custom toolbar to a macro. Recorded the macros careful to assign them only to current Workbook. Now no matter what document I open the custom toolbar is opened also. When I goto ToolsMacroMacros there are not maros listed for any of the choices (This workbook, All Open workbooks,etc). Is there a simple way short of writing VBA to restrict this toolbar to opening only in the document for which it was created? Thanks |
#2
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
Jack, open Excel and open the workbook for which the toolbar was
created. Right-click on the toolbar and select customize. On the Toolbars tab, click Attach. Select the toolbar from the list. Click Copy. Click OK. This attaches the toolbar to the worksheet. Alt-F11 to view the code editor. If you do not have a standard module, click Insert, then Module. In the standard module, put Sub Auto_Open() Commandbars("NameOfToolbarHere").Visible=True End Sub Sub Auto_Close() Commandbars("NameOfToolbarHere").Delete End Sub Of course, put the name of your toolbar in place of NameOfToolbarHere, leaving the quotes in. Now, when you close Excel, the toolbar will be deleted from the toolbar collection. When you open the file again, the toolbar will be shown. James Jack_Feeman wrote: Created a custom toolbar for a template using the customize command. Assign each button in the custom toolbar to a macro. Recorded the macros careful to assign them only to current Workbook. Now no matter what document I open the custom toolbar is opened also. When I goto ToolsMacroMacros there are not maros listed for any of the choices (This workbook, All Open workbooks,etc). Is there a simple way short of writing VBA to restrict this toolbar to opening only in the document for which it was created? Thanks |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
Automatically showing the document's properties when it is opened | Excel Discussion (Misc queries) | |||
How do I get the files opened on the toolbar? | Excel Discussion (Misc queries) | |||
Excel not showing last opened files | Excel Discussion (Misc queries) | |||
Pointing custom toolbar entries to correct macro path on copied workbooks | Excel Programming | |||
custom toolbar buttons are saved where? Excel loads twice bymistake and all my custom toolbar buttons get gone!!! | Excel Programming |