Disable Excel Command Bars and Remove Irritating Grey Bar

  • Thread starter Andy B via OfficeKB.com
  • Start date
A

Andy B via OfficeKB.com

I have tried to use the following code to disable the commandbars in an Excel
tool I am developing.
The code works fine, in disabling the command bars.
However, I occasionally get an irritating grey bar, roughly about as thick as
the 'DisplayFormulaBar', at the top of the page that obscures some of the
text at the top of the spreadsheet. Does anyone know how to disable the
commandbars and ensure that the grey bar is not produced at the top of the
spreasheet page.

Dim CBar As CommandBar

Application.ActiveWindow.DisplayHeadings = False
Application.DisplayFormulaBar = False

For Each CBar In Application.CommandBars
CBar.Enabled = False
Next

Yours in anticipation

AB
 

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

Top