[mso] Re: Excel Toolbar

Go to the VBA environment (Shift-F11 or Tools-Macro-Visual Basic Editor).

Double-click on the "ThisWorkbook" in the Project Explorer. If the Project
Explorer is not visible then Ctrl-R or View-Project Explorer.

In the code pane, select Workbook form the left hand drop-down box and
SheetActivate from the right-hand one. Past the following code in so that
it reads:

Private Sub Workbook_SheetActivate(ByVal Sh As Object)
  Application.CommandBars("MyToolbar").Visible = (Sh.Name = "Sheet1")
End Sub

Where MyToolbar is the name of your custom toolbar and Sheet1 is the only
sheet you want it to appear on.

It works because (Sh.Name = "Sheet1") evaluates to True or False depending
on the Sheet that is being activated. Therefore you are setting the
visible property of the toolbar to that value.

Note this doesn't stop a user from actually show the toolbar on another
sheet but if they then choose a different sheet and come back it will not
be visible again.

Regards, John

-----Original Message-----
From: mso-bounce@xxxxxxxxxxxxx [mailto:mso-bounce@xxxxxxxxxxxxx] On Behalf
Of Glenda Wells
Sent: 23 April 2004 18:05
To: mso@xxxxxxxxxxxxx
Subject: [mso] Excel Toolbar


Is there any way to make a custom tool bar for a specific worksheet but
have all other worksheets open with the default toolbar? /g


  _____

<< ella for Spam Control >> has removed 10577 Spam messages and set aside
0 Newsletters for me
You can use it too - and it's FREE!  www.ellaforspam.com

*************************************************************
You are receiving this mail because you subscribed to mso@xxxxxxxxxxxxx or
MicrosoftOffice@xxxxxxxxxxxxxxxx

To send mail to the group, simply address it to mso@xxxxxxxxxxxxx

To Unsubscribe from this group, send an email to
mso-request@xxxxxxxxxxxxx with the word "unsubscribe" (without the quotes)
in the subject line.

Or, visit the group's homepage and use the dropdown menu.  This will also
allow you to change your email settings to digest or vacation (no mail).
http://www.freelists.org/webpage/mso

To be able to use the files section for sharing files with the group, send
a request to mso-moderators@xxxxxxxxxxxxx and you will be sent an
invitation with instructions.  Once you are a member of the files group,
you can go here to upload/download files:
http://www.smartgroups.com/vault/msofiles
*************************************************************


*************************************************************
You are receiving this mail because you subscribed to mso@xxxxxxxxxxxxx or 
MicrosoftOffice@xxxxxxxxxxxxxxxx

To send mail to the group, simply address it to mso@xxxxxxxxxxxxx

To Unsubscribe from this group, send an email to 
mso-request@xxxxxxxxxxxxx with the word "unsubscribe" (without the quotes) in 
the subject line.

Or, visit the group's homepage and use the dropdown menu.  This will also allow 
you to change your email settings to digest or vacation (no mail).
http://www.freelists.org/webpage/mso

To be able to use the files section for sharing files with the group, send a 
request to mso-moderators@xxxxxxxxxxxxx and you will be sent an invitation with 
instructions.  Once you are a member of the files group, you can go here to 
upload/download files:
http://www.smartgroups.com/vault/msofiles
*************************************************************

Other related posts: