Protect Excel user form code

Apple08

Active Member
Joined
Nov 1, 2014
Messages
450
Hi everyone

i have created an Excel user form but data don’t need to store in any Excel workbook. All I want to do is to protect my userform code from viewing or editing by users but allow users to input data in the user form.

Please could anyone tell tell me how can I protect the userform code? Many thanks.
 

Excel Facts

How to find 2nd largest value in a column?
MAX finds the largest value. =LARGE(A:A,2) will find the second largest. =SMALL(A:A,3) will find the third smallest
To protect your codes with a password and hide them for other users - in the VB Editor you can choose the Tools menu and then VBA Project Properties.
Then on the Protection tab you can check "Lock Project for viewing" and provide a password on the 2 textboxes below.

Thus, the next time you open the workbook when you enable the VBE, you will be prompted to provide the password for it when you click in the relevant project in the Project Explorer section...
 
Upvote 0
If you forget your password, you will also be locked out. But this is not a foolproof mehtod of protecting your code against hackers who are determined to steal it. It will protect against the casual user being able to open the code modules through the vb editor.
 
Upvote 0

Forum statistics

Threads
1,224,743
Messages
6,180,687
Members
452,994
Latest member
Janick

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