Removing all Toolbars in one line

  • Thread starter Thread starter matt dunbar
  • Start date Start date
M

matt dunbar

Hi all

the Open macro is real useful and I use it to remove the
toolbars/command bars on my workbooks (Restoring the four basic ones
using the Close macro)

I have written code such as

Application.CommandBars("Standard").Visible = False
Application.CommandBars("Formatting").Visible = False
Application.CommandBars("Chart").Visible = False
Application.CommandBars("Control Toolbox").Visible = False

etc

within this Open macro

is there a more efficient way to remove all Toolbars as on some versions
of Excel 2003 there are different and more toolbars to Excel 97

TIA

matt
 
Dim ocb As Object

For Each ocb In Application.CommandBars
If ocb.Name <> "Worksheet Menu Bar" And _
ocb.Visible Then _
ocb.Visible = False
Next ocb
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Similar Threads

MAJOR PROBLEM! --- Menu Bars don't unhide? 9
Customise Button on toolbar 1
Stripping down excel 2
auto enable macros 5
Toolbar not hiding 1
Do Until ?? 8
Workbook_close 1
Hide the close X in excel 2

Back
Top