Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1
Default Hide And Un-hide Excel Toolbars


Hi everybody,

Is there any code to hide all toolbars when opening the workbook and
unhide them when closing the workbook,

I have one code for that purpose, but the problem with it is that I
have to mention all toolbars names in the code to hide or unhide them,
and when any toolbar is not mentioned in the code, it will not be
hidden or unhidden.

I hope that my question is clear for all,

Thankyou


--
Jim333
------------------------------------------------------------------------
Jim333's Profile: http://www.excelforum.com/member.php...fo&userid=5186
View this thread: http://www.excelforum.com/showthread...hreadid=383090

  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 233
Default Hide And Un-hide Excel Toolbars

Sub showhide(bHide As Boolean)
Dim cmb As CommandBar
Static col As New Collection

If bHide Then
For Each cmb In Application.CommandBars
If cmb.Type = msoBarTypeMenuBar Or cmb.Type = msoBarTypeNormal Then
If cmb.Visible Then
cmb.Visible = False
cmb.Enabled = False
col.Add cmb, cmb.Name
End If
End If
Next cmb
Else
For Each cmb In col
cmb.Visible = True
cmb.Enabled = True
Next cmb
Set col = Nothing
End If


End Sub

DM Unseen

  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1
Default Hide And Un-hide Excel Toolbars


Hi,

Thank you so much for ur reply,

I tried to install the code in a workbook, but It didn't work so, I
would like u please to put it in a workbook and attach it.

Thanx,


--
Jim333
------------------------------------------------------------------------
Jim333's Profile: http://www.excelforum.com/member.php...fo&userid=5186
View this thread: http://www.excelforum.com/showthread...hreadid=383090

  #4   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 233
Default Hide And Un-hide Excel Toolbars

Compile error?

Pls mail me so I have your email address

DM Unseen

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
hide the menubars and toolbars Pietro Excel Discussion (Misc queries) 11 April 11th 08 02:45 PM
close (hide) toolbars Anthony Excel Discussion (Misc queries) 7 June 5th 05 03:19 PM
How do I hide and show all toolbars Quinam Excel Worksheet Functions 1 April 12th 05 04:11 PM
Hide Toolbars Jennifer Excel Programming 3 January 17th 05 03:55 PM
Hide toolbars Lawlera Excel Programming 3 February 3rd 04 04:37 PM


All times are GMT +1. The time now is 09:32 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"