B
Big Chris
Hi! Thanks for looking at my message.
I'm trying to hide the toolbars on opening a workbook, but leave th
'Worksheet Menu Bar' (The menu in words....'File', 'Edit', 'View' etc)
I then want to unhide those same toolbars upon closing the workbook.
I got the following from searching past threads.....
---------------------------
Sub Auto_Open()
ShowToolbars False
End Sub
Sub Auto_Close()
ShowToolbars True
End Sub
Sub ShowToolbars(ToBeSeen As Boolean)
Dim CB As CommandBar
For Each CB In Application.CommandBars
If Not CB.Name = CommandBars.ActiveMenuBar.Name Then CB.Enabled
ToBeSeen
Next
End Sub
-------------------------------
....but it hides ALL toolbars. So Bill Manville suggested using:
----------------------------
If Not CB.Name = CommandBars.ActiveMenuBar.Name Then CB.Enabled
ToBeSeen
----------------------------
I replaced the 3rd to last line with this code but it actually hid th
Windows Menu Bar and didn't unhide it upon closing!!
Did I put it in the wrong place?
Can anyone please advise?
Many thanks
I'm trying to hide the toolbars on opening a workbook, but leave th
'Worksheet Menu Bar' (The menu in words....'File', 'Edit', 'View' etc)
I then want to unhide those same toolbars upon closing the workbook.
I got the following from searching past threads.....
---------------------------
Sub Auto_Open()
ShowToolbars False
End Sub
Sub Auto_Close()
ShowToolbars True
End Sub
Sub ShowToolbars(ToBeSeen As Boolean)
Dim CB As CommandBar
For Each CB In Application.CommandBars
If Not CB.Name = CommandBars.ActiveMenuBar.Name Then CB.Enabled
ToBeSeen
Next
End Sub
-------------------------------
....but it hides ALL toolbars. So Bill Manville suggested using:
----------------------------
If Not CB.Name = CommandBars.ActiveMenuBar.Name Then CB.Enabled
ToBeSeen
----------------------------
I replaced the 3rd to last line with this code but it actually hid th
Windows Menu Bar and didn't unhide it upon closing!!
Did I put it in the wrong place?
Can anyone please advise?
Many thanks