XL97 - Command Bar Removal

  • Thread starter Thread starter Trevor Williams
  • Start date Start date
T

Trevor Williams

Dear All

Has anyone got a snipet of code that remembers which
CommandBars were visible on open so that on exit they can
be switched back on.

I can do all or nothing at the moment

Thanks in advance

Trevor
 
Hi Trevor

Use the Enabled property instead of the Visible

Dim bar As CommandBar
For Each bar In Application.CommandBars
bar.Enabled = False
Next

To get them back use this

Dim bar As CommandBar
For Each bar In Application.CommandBars
bar.Enabled = True
Next
 
Back
Top