LinkBack Thread Tools Search this Thread Display Modes
Prev Previous Post   Next Post Next
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 2
Default Deactivate workbook commandbar for one sheet?

I've never run into this one before. I usu. need a repeating toolbar
for any sheet in a workbook. Therefore, in the "ThisWorkbook" I copy
this code into each new workbook I make that uses a custom commandbar:



Private Sub Workbook_Activate()
On Error Resume Next
Application.CommandBars("My Assigned Toolbar Name").Visible = True
End Sub
Private Sub Workbook_Deactivate()
' CommandBars disappear (whilst the workbook remains open, but another
is in view)
On Error Resume Next
Application.CommandBars("My Assigned Toolbar Name").Visible = False
End Sub



So that takes care of activating the custom toolbar on workbook open,
and deactivating it on workbook close and the toolbar shows up on any
sheet I create within that workbook.

But, what does one do if one wants to "hide" the toolbar for sheet 2,
say?

Thanks. :oD

 
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
Command Bar & Workbook Deactivate Gixxer_J_97[_2_] Excel Programming 3 September 27th 05 03:16 AM
Deactivate sheet Jay Northrop Excel Programming 5 July 22nd 05 03:13 PM
Workbook Deactivate incjourn[_4_] Excel Programming 1 September 14th 04 02:51 PM
Workbook Deactivate Event TerryF[_2_] Excel Programming 1 January 6th 04 01:16 AM
UserForms to deactivate workbook Vasant Nanavati Excel Programming 0 December 20th 03 05:09 AM


All times are GMT +1. The time now is 01:16 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"