Home |
Search |
Today's Posts |
|
#1
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
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
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
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 |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
problem while opening the excel sheet | New Users to Excel | |||
"Start a new group" coding possible for a commandbar (floating toolbar)? | Excel Programming | |||
Get floating CommandBar position | Excel Programming | |||
Floating Toolbars | Excel Discussion (Misc queries) | |||
Floating Toolbars | Excel Programming |