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.
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.