Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.misc
RCW RCW is offline
external usenet poster
 
Posts: 9
Default Custom Toolbar Visibility

I have a workbook with multiple custom toolbars. Some only work right on a
single worksheet. Is there a way to have only Custom Toolbar 1 visible when
sheet 1 is selected, only Custom Toolbar 2 visible when sheet 2 is selected,
etc.?
  #2   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 10,593
Default Custom Toolbar Visibility

You need to make them visible/not visible in the appropriate worksheet
Activate/Deactivate events.

Private Sub Worksheet_Activate()
Application.CommandBars("myToolbar").Visible = True
End Sub

Private Sub Worksheet_Deactivate()
Application.CommandBars("myToolbar").Visible = False
End Sub

'This is worksheet event code, which means that it needs to be
'placed in the appropriate worksheet code module, not a standard
'code module. To do this, right-click on the sheet tab, select
'the View Code option from the menu, and paste the code in.


--
HTH

Bob Phillips

(replace somewhere in email address with gmail if mailing direct)

"RCW" wrote in message
...
I have a workbook with multiple custom toolbars. Some only work right on

a
single worksheet. Is there a way to have only Custom Toolbar 1 visible

when
sheet 1 is selected, only Custom Toolbar 2 visible when sheet 2 is

selected,
etc.?



  #3   Report Post  
Posted to microsoft.public.excel.misc
RCW RCW is offline
external usenet poster
 
Posts: 9
Default Custom Toolbar Visibility

Worked great. Thanks alot.

"Bob Phillips" wrote:

You need to make them visible/not visible in the appropriate worksheet
Activate/Deactivate events.

Private Sub Worksheet_Activate()
Application.CommandBars("myToolbar").Visible = True
End Sub

Private Sub Worksheet_Deactivate()
Application.CommandBars("myToolbar").Visible = False
End Sub

'This is worksheet event code, which means that it needs to be
'placed in the appropriate worksheet code module, not a standard
'code module. To do this, right-click on the sheet tab, select
'the View Code option from the menu, and paste the code in.


--
HTH

Bob Phillips

(replace somewhere in email address with gmail if mailing direct)

"RCW" wrote in message
...
I have a workbook with multiple custom toolbars. Some only work right on

a
single worksheet. Is there a way to have only Custom Toolbar 1 visible

when
sheet 1 is selected, only Custom Toolbar 2 visible when sheet 2 is

selected,
etc.?




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
Custom Macro Toolbar? Wuddus Excel Discussion (Misc queries) 2 August 8th 06 03:30 PM
Toolbar problem Anthony Excel Discussion (Misc queries) 1 June 1st 05 01:05 AM
Loading custom toolbar anonymous Excel Discussion (Misc queries) 0 March 10th 05 07:07 PM
How can I attach a custom toolbar to only appear on one specific . ABuia Excel Worksheet Functions 1 January 18th 05 02:57 PM
I would like to delete a custom toolbar from the workspace. How? twiga Setting up and Configuration of Excel 1 December 23rd 04 05:55 PM


All times are GMT +1. The time now is 02:39 PM.

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

About Us

"It's about Microsoft Excel"