View Single Post
  #1   Report Post  
Posted to microsoft.public.excel.programming
StargateFanFromWork[_4_] StargateFanFromWork[_4_] is offline
external usenet poster
 
Posts: 51
Default Floating commandbar problem -- toolbars destroyed only if sheet first upon opening ... ?

I have 3 sheets in a workbook. One sheet has a floating toolbar that only
it needs. The 2 other sheets have this code in them:



Private Sub Worksheet_Activate()
Application.CommandBars("My Spreadsheet").Visible = False
End Sub
Private Sub Worksheet_Deactivate()
Application.CommandBars("My Spreadsheet").Visible = True
End Sub



That works great as long as the one sheet (the first one) that _does_ need
the toolbar is the one that is showing first. If either of the other 2 that
don't need it are what one sees first, I have to click over to the first
sheet and then back to either of the other 2 before it disappears. I've
been trying to remember to close this workbook on the first worksheet but
don't always remember. Is there perhaps a better way to handle this toolbar
deactivate issue? TIA.