Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 47
Default Custom Toolbar showing in any and all workbooks opened

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   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 269
Default Custom Toolbar showing in any and all workbooks opened

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
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
Automatically showing the document's properties when it is opened Dan Excel Discussion (Misc queries) 1 March 18th 09 07:16 PM
How do I get the files opened on the toolbar? Lisan Excel Discussion (Misc queries) 1 February 23rd 06 04:18 PM
Excel not showing last opened files Luis Verme Excel Discussion (Misc queries) 0 August 19th 05 04:20 PM
Pointing custom toolbar entries to correct macro path on copied workbooks COR Excel Programming 2 July 2nd 04 03:04 AM
custom toolbar buttons are saved where? Excel loads twice bymistake and all my custom toolbar buttons get gone!!! Kevin Waite Excel Programming 2 March 3rd 04 03:31 PM


All times are GMT +1. The time now is 04:27 AM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
Copyright ©2004-2025 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"