Protecting Macro Toolbar selection in Workbook

Bowdlerb

New Member
Joined
Mar 6, 2002
Messages
11
I have hidden and protected my workbook using the "Protect Workbook" command and included the password within the macro. The 'edit' facility in the Macro option in the drop-down Toolbar still appears to be available, allowing the user to read the VB. Is there a way of locking out the option to see the VB?[/code]
 

Excel Facts

Enter current date or time
Ctrl+: enters current time. Ctrl+; enters current date. Use Ctrl+: Ctrl+; Enter for current date & time.
Go into the VBA editor, and right-click on the project. Select "properties" and in the dialog box click on the "protection" tab. Check "lock project for viewing" and then supply a password. Save your workbook and close. Now you have to provide a password to view your code.
 
Upvote 0
Welcome to the Board!

There are several thing that you can do. The first and simplest would be to password protect your VBA code. In VBA goto Tools --> VBA Project Properties --> LockProject for viewing --> Enter Password.

If you want something more, post back. There are ways to eliminate all or part of the command bars and menus.

Hope that helps,

Smitty
 
Upvote 0
thanks for the information. I tried what you suggested but upon saving and re-entering the file, I can still read the macros which will show the password I have entered into the code. Any other ideas?
 
Upvote 0
Are you sure you protected the right VBA project? What do you mean by "read the macros"?
 
Upvote 0
You are quite right, I had not chosen the correct VB Project. I have no re-tried your instructions and it has worked fine. Thanks so much - Barrie Bowdler :biggrin:
 
Upvote 0

Forum statistics

Threads
1,214,813
Messages
6,121,706
Members
449,048
Latest member
81jamesacct

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top