Command Bar

  • Thread starter Derrick - potential VBA developer
  • Start date
D

Derrick - potential VBA developer

I tried to set up a file that allows different users to only view a section
of the file. In order to protect some data, I tried to use the following
macro to disable the command bar.

Sub disable
dim bar as commandbar
for each bar in application.commandbars
bar.enabled = false
next
end sub

I also use the same code to enable the commandbars before close. However,
when I open a new excel, nothing happen when I right click on anywhere in the
cell. I tried several ways but can not get it back. If I run the same code, I
can get it back. But after i close the file, same problem will happen when I
reopen the file. I really need to borrow your knowledge here.
 

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