Locking off VBA

Peterw_2506

Board Regular
Joined
Jan 28, 2011
Messages
78
Hi everybody,

How do you lock the VBA screen (alt+11) in excel so other people can't screw the code up on you when a file has to be passed around in a team. I need to protect something which is going to be sent to a third party.

regards, Peter
 

Excel Facts

Return population for a City
If you have a list of cities in A2:A100, use Data, Geography. Then =A2.Population and copy down.
Hallo

This code will disable commands Alt F11

Code:
Application.OnKey "%{F11}", "InsertProc"
They will not be enough to hide the code
 
Upvote 0
In the VBE, Tools > VBA Project Properties, Protection tab, tick Lock project for viewing and supply a password. Save, close and re-open the workbook to see the effect.
 
Upvote 0
Click Tools/VBAProject Properties on the VBA's menu bar, click the Protection tab, select the "Lock project for viewing" checkbox and assign a Password where indicated (make sure you do not forget the password or you will not be able to get back into your own project).
 
Upvote 0

Forum statistics

Threads
1,224,583
Messages
6,179,681
Members
452,937
Latest member
Bhg1984

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