Disabling Toolbar

F

Francis Ang

I am trying to disable the 'Insert' and 'View' of the worksheet menu bar with
the following codes -

Application.CommandBars("Insert").Enabled = false
Application.CommandBars("View").Enabled = false

but is having a problem; only 'View' is disabled but 'Insert' is not. Is
it because
"Insert" cannot be disabled in this manner? Is so, how can I disable
'Insert'.

Thank you.
 
H

Halim

Hi Ang,

Try this one :
CommandBars(1).Controls("insert").Enabled = False

Because Insert is a control of Worksheet Menu Bar is index=1
so I use 1
 

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