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

Did you know Excel offers Filter by Selection?
Add the AutoFilter icon to the Quick Access Toolbar. Select a cell containing Apple, click AutoFilter, and you will get all rows with Apple
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,223,711
Messages
6,174,025
Members
452,542
Latest member
Bricklin

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