PC Review


Reply
Thread Tools Rate Thread

Custom Toolbar showing in any and all workbooks opened

 
 
=?Utf-8?B?SmFja19GZWVtYW4=?=
Guest
Posts: n/a
 
      31st Oct 2006
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 Tools>Macro>Macros 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 With Quote
 
 
 
 
Zone
Guest
Posts: n/a
 
      31st Oct 2006
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 Tools>Macro>Macros 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 With Quote
Reply

Thread Tools
Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

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


Similar Threads
Thread Thread Starter Forum Replies Last Post
Custom XLAM tab not showing up when excel is opened from word chris seiter Microsoft Excel Programming 0 9th Mar 2010 02:46 PM
Multiple Workbooks Using the Same Custom Toolbar Ken Microsoft Excel Programming 2 29th Jul 2009 11:19 PM
Qucik Access Toolbar not showing custom controls Preditor Havasu Microsoft Access 1 4th Oct 2007 09:31 PM
Print option not showing on custom toolbar Don Microsoft Access Forms 0 4th Jan 2006 12:26 PM
Pointing custom toolbar entries to correct macro path on copied workbooks COR Microsoft Excel Programming 2 2nd Jul 2004 03:04 AM


Features
 

Advertising
 

Newsgroups
 


All times are GMT +1. The time now is 07:02 AM.