Menu Item Deleted

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

In one excel file, in the ThisWorkbook object, in the Private Sub
Workbook_Open() event, I entered the this line of code:
Application.CommandBars(1).Name("Format").Delete
The intent was to disable Format>Sheets>unhide to the users in this
particular file.
Format has gone away in all instances of Excel and reinstalls do not cure
the problem. I am at a loss. Can anyone help?
 
BTW, the code you want is

Application.CommandBars(1).Controls("Format").controls("Sheet").controls("Un
hide...").enabled=false


--

HTH

RP
(remove nothere from the email address if mailing direct)
 
Hi Caddy

If your workbook will also be used in non US Excel versions use the ID numbers
of the control(see my site).
If not use Bob's example
 
Ron,

I keep forgetting that. Thanks

Bob


Ron de Bruin said:
Hi Caddy

If your workbook will also be used in non US Excel versions use the ID numbers
of the control(see my site).
If not use Bob's example
 

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

Back
Top