Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Anthony
 
Posts: n/a
Default close (hide) toolbars

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
  #2   Report Post  
Ron de Bruin
 
Posts: n/a
Default

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



  #3   Report Post  
Anthony
 
Posts: n/a
Default

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




  #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






  #5   Report Post  
Anthony
 
Posts: n/a
Default

Ron

Fantastic - it worked , however just one thing#

If I have a personal toolbar names 'log' can/how do I change ur code to show
just this toolbar on opening?
thanks again

"Ron de Bruin" wrote:

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








  #6   Report Post  
Ron de Bruin
 
Posts: n/a
Default

Try this

Sub Disable_Command_Bars_1()
'This will disable all BuiltIn Command bars
Dim Cbar As CommandBar
For Each Cbar In Application.CommandBars
If Cbar.BuiltIn = True Then
Cbar.Enabled = False
End If
Next
End Sub


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



"Anthony" wrote in message ...
Ron

Fantastic - it worked , however just one thing#

If I have a personal toolbar names 'log' can/how do I change ur code to show
just this toolbar on opening?
thanks again

"Ron de Bruin" wrote:

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








  #7   Report Post  
Anthony
 
Posts: n/a
Default

Ron,
So do I just use the code given in ur last reply to show only my toolbar ??
thanks again
Anthony

"Ron de Bruin" wrote:

Try this

Sub Disable_Command_Bars_1()
'This will disable all BuiltIn Command bars
Dim Cbar As CommandBar
For Each Cbar In Application.CommandBars
If Cbar.BuiltIn = True Then
Cbar.Enabled = False
End If
Next
End Sub


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



"Anthony" wrote in message ...
Ron

Fantastic - it worked , however just one thing#

If I have a personal toolbar names 'log' can/how do I change ur code to show
just this toolbar on opening?
thanks again

"Ron de Bruin" wrote:

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









  #8   Report Post  
Ron de Bruin
 
Posts: n/a
Default

Hi Anthony

Use this working example

Change YourCustomBar to your bar name

Private Sub Workbook_Activate()
Dim Cbar As CommandBar
For Each Cbar In Application.CommandBars
If Cbar.Name < "Worksheet Menu Bar" And Cbar.Name < "YourCustomBar" 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
Cbar.Enabled = True
Next
With Application
.DisplayFormulaBar = True
.DisplayStatusBar = True
End With
End Sub


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



"Anthony" wrote in message ...
Ron,
So do I just use the code given in ur last reply to show only my toolbar ??
thanks again
Anthony

"Ron de Bruin" wrote:

Try this

Sub Disable_Command_Bars_1()
'This will disable all BuiltIn Command bars
Dim Cbar As CommandBar
For Each Cbar In Application.CommandBars
If Cbar.BuiltIn = True Then
Cbar.Enabled = False
End If
Next
End Sub


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



"Anthony" wrote in message ...
Ron

Fantastic - it worked , however just one thing#

If I have a personal toolbar names 'log' can/how do I change ur code to show
just this toolbar on opening?
thanks again

"Ron de Bruin" wrote:

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











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
How do I hide and show all toolbars Quinam Excel Worksheet Functions 1 April 12th 05 04:11 PM
Customizing ToolBars MIKE MEDLIN Excel Discussion (Misc queries) 0 January 13th 05 12:11 AM
Stubborn toolbars in Excel 007 Excel Discussion (Misc queries) 9 December 11th 04 02:02 PM
How can I close only 1 workbook when I have many open? jpt consulting Excel Discussion (Misc queries) 3 November 30th 04 11:58 PM
Conditional Hide function for Excel mr.woofies Excel Worksheet Functions 1 October 28th 04 03:04 PM


All times are GMT +1. The time now is 08:01 AM.

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

About Us

"It's about Microsoft Excel"