protect command button

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

Guest

I know how to password protect an Excel VBA project, but is there any way to
protect a worksheet command button object itself (i.e., prevent a user from
adding Visual Basic to the menu bar, clicking into VB design mode, and
moving, resizing, or deleting the command button?)

Thanks ...

Bill Morgan
 
Go into visual basic design mode and select 'Tools' from the menu bar. Then
select VBAProject Properties...

Select the protection tab.

This will ensure nobody can modify your command button with the correct
password.

Hope this help.
 
Francis,

Thanks for your response. I can protect the VBA code, as you suggest, but a
user can still add the VB feature to the toolbar and click the design button
so that he can move my command button around (or event delete it). I could
make the workbook "read-only" but then the user can still move the comman
button while inside the workbook.

I'm wondering if there is a way to completely protect the command button so
the user cannot move/edit it in any way, even in a read-only version of the
workbook.

Thanks again ...
 
Hi Bill

One of the ways which I have handled the situation you mentioned is to hide
all the toolbars including the menu when your workbook is opened. Create and
display your own customised toolbars and menu.

However, make sure that the default toolbars and menu are restored when you
close your workbook.

Hope this help.
 
Francis,

This sounds like the best alternative out there. Thanks for the suggestion ...
 

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