View Single Post
  #4   Report Post  
Ron de Bruin
 
Posts: n/a
Default

Show me the code you copy in the two events

You can something like this

Private Sub Workbook_Activate()
' This will disable all Command bars except
' the Worksheet Menu Bar
Dim Cbar As CommandBar
For Each Cbar In Application.CommandBars
If Cbar.Name < "Worksheet Menu Bar" Then
Cbar.Enabled = False
End If
Next
With Application
.DisplayFormulaBar = False
.DisplayStatusBar = False
End With
End Sub

Private Sub Workbook_Deactivate()
Dim Cbar As CommandBar
For Each Cbar In Application.CommandBars
If Cbar.Name < "Worksheet Menu Bar" Then
Cbar.Enabled = True
End If
Next
With Application
.DisplayFormulaBar = True
.DisplayStatusBar = True
End With
End Sub


Fore more information about events see
http://www.cpearson.com/excel/events.htm



--
Regards Ron de Bruin
http://www.rondebruin.nl



"Anthony" wrote in message ...
sorry Ron but I'm a bit of a novice when it comes to VB.
I have opened the VB code and pasted urs (from ur orig reply) into the
thisworkbook module, but it doesn't seem to do much !
if I open my excel workshhet again , all the toolbars I want to hide are
still there !
HELP PLEASE !!

"Ron de Bruin" wrote:

Hi Anthony

You can use this events in the thisworkbook module to run your code

Private Sub Workbook_Activate()

End Sub

Private Sub Workbook_Deactivate()

End Sub

For more information see
http://www.rondebruin.com/menuid.htm



--
Regards Ron de Bruin
http://www.rondebruin.nl



"Anthony" wrote in message ...
Hi
Can anybody advise how I can close or hide the 'Formatting', 'Standard',
'Formula', 'Status' and the 'Worksheet Menubar' toolbars when my excel
worksheet is opened, but NOT affect their apperance in any other excel
worksheet.
I would imagine it takes some VBA script, but any ideas for a novice ??
thanks