Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 3
Default Toggle Toolbars in Excel2003

I am new to this group; however, I have used many of the suggestions
given. I am trying to toggle all toolbars in Excel. The premise is when
the application opens, an array is created with all of the visible
toolbars. I then close all of these toolbars. When the application
closes, all of the "once visible" toolbars are opened again. I even
found some code on the Microsoft site to do this. The problem is that
it doesn't work on ALL toolbars. For example, Borders, Control Toolbox,
External Data, etc toolboxs will not toggle with the rest. Has anyone
else come across this? Any help would be greatly appreciated.

-William

  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 10,593
Default Toggle Toolbars in Excel2003

This should do it

Option Explicit

Private mFormulaBar

Private Sub Workbook_BeforeClose(Cancel As Boolean)
Dim oCB As CommandBar
For Each oCB In Application.CommandBars
oCB.Enabled = True
Next oCB

Application.DisplayFormulaBar = mFormulaBar
End Sub

Private Sub Workbook_Open()
Dim oCB As CommandBar
For Each oCB In Application.CommandBars
oCB.Enabled = False
Next oCB

mFormulaBar = Application.DisplayFormulaBar
Application.DisplayFormulaBar = False
End Sub

'This is workbook event code.
'To input this code, right click on the Excel icon on the worksheet
'(or next to the File menu if you maximise your workbooks),
'select View Code from the menu, and paste the code



--
HTH

Bob Phillips

(replace somewhere in email address with gmail if mailing direct)

wrote in message
ups.com...
I am new to this group; however, I have used many of the suggestions
given. I am trying to toggle all toolbars in Excel. The premise is when
the application opens, an array is created with all of the visible
toolbars. I then close all of these toolbars. When the application
closes, all of the "once visible" toolbars are opened again. I even
found some code on the Microsoft site to do this. The problem is that
it doesn't work on ALL toolbars. For example, Borders, Control Toolbox,
External Data, etc toolboxs will not toggle with the rest. Has anyone
else come across this? Any help would be greatly appreciated.

-William



  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 3
Default Toggle Toolbars in Excel2003

Thanks so much for the reply. It works great! Can you give a quick
explaination as to what is going on in the code with "mFormulaBar"? I
am not sure how that is working. I am sure that it is something
simple...

Thanks again,
William Boswell

  #4   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 3
Default Toggle Toolbars in Excel2003

Thanks so much for the reply. It works great! Can you give a quick
explaination as to what is going on in the code with "mFormulaBar"? I
am not sure how that is working. I am sure that it is something
simple...

Thanks again,
William Boswell

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
excel2003 archie Charts and Charting in Excel 1 May 28th 10 01:38 PM
Excel2003 MAX and MIN with < hamricka[_3_] Excel Worksheet Functions 10 August 20th 09 04:06 PM
How to get excel2007 toolbars to look classic like excel2003? jmhood42 Setting up and Configuration of Excel 2 January 19th 09 09:47 AM
Excel2003 from Excel97 JohnL Excel Discussion (Misc queries) 3 April 15th 05 11:41 PM
Please Help, No Toolbars in my view-toolbars! [email protected] Excel Programming 2 February 19th 05 09:15 PM


All times are GMT +1. The time now is 01:10 PM.

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

About Us

"It's about Microsoft Excel"