Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
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.


  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 272
Default Floating commandbar problem -- toolbars destroyed only if sheet fi

I would put the code only in the 1 sheet that you want the Command bar to
appear in.
Activate:
..Visible = True
Deactivate:
..Visible = False
--
Charles Chickering

"A good example is twice the value of good advice."


"StargateFanFromWork" wrote:

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.



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
problem while opening the excel sheet karthik New Users to Excel 0 May 19th 08 10:20 AM
"Start a new group" coding possible for a commandbar (floating toolbar)? StargateFanFromWork[_3_] Excel Programming 0 June 19th 06 03:49 PM
Get floating CommandBar position Patti[_2_] Excel Programming 4 July 18th 05 09:08 PM
Floating Toolbars Dave Excel Discussion (Misc queries) 0 April 29th 05 06:44 PM
Floating Toolbars [email protected] Excel Programming 11 December 17th 04 11:29 PM


All times are GMT +1. The time now is 11:55 PM.

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

About Us

"It's about Microsoft Excel"