Preventing Users from Modifying Custom Command Bars

G

Guest

The article "Preventing Users from Modifying Custom Command Bars" in the MSDN Library suggests there are only three ways to access the Customize dialog box, and provides two lines of VBA code that blocks access to this dialog box

However, there is a fourth way to access the Customize dialog box. At the end of a toolbar (at least in Excel XP) there is a narrow button with only an arrow on it, called Toolbar Options I think. This button is present even on the custom toolbars I created! When I click this button, under the Add or Remove Buttons popup menu, the Customize... command is available, and it brings up the Customize dialog box even after I have run the two lines of code provided in the MSDN article. I've tried to write all sorts of code, but cannot disable the Tollbar Options button. Do you know how to do this using VBA code? Or, alternatively how to block users from modifying custom tollbars using this fourth way

Thanks for helping.
 
B

Bob Umlas

commandbars("Toolbar list").Enabled=False

Even tho the arrow will still be there, it no longer works!

reset via commandbars("Toolbar list").Enabled=True

Bob Umlas
Excel MVP

Vlad said:
The article "Preventing Users from Modifying Custom Command Bars" in the
MSDN Library suggests there are only three ways to access the Customize
dialog box, and provides two lines of VBA code that blocks access to this
dialog box.
However, there is a fourth way to access the Customize dialog box. At the
end of a toolbar (at least in Excel XP) there is a narrow button with only
an arrow on it, called Toolbar Options I think. This button is present even
on the custom toolbars I created! When I click this button, under the Add or
Remove Buttons popup menu, the Customize... command is available, and it
brings up the Customize dialog box even after I have run the two lines of
code provided in the MSDN article. I've tried to write all sorts of code,
but cannot disable the Tollbar Options button. Do you know how to do this
using VBA code? Or, alternatively how to block users from modifying custom
tollbars using this fourth way?
 

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