Protecting VBA from viewing

Antony

New Member
Joined
Sep 24, 2002
Messages
5
I write VBA code for users in my company.
Is there a way to protect the VBA code from being view by others? Can I compile the code?

Thank you
 

Excel Facts

Does the VLOOKUP table have to be sorted?
No! when you are using an exact match, the VLOOKUP table can be in any order. Best-selling items at the top is actually the best.
To protect the project from being viewed:

1. Open the VBE
2. Goto Tools|VBAProject Properties
3. Choose the "Protection Tab"
4. Stick your password in.
5. Close and reopen the workbook and the VBA code will require a password to be viewed.

VBA doesn't compile, or at least not in the sense of a stand-alone application. To get some performance results when your project is ready to be shipped:

1. Open the VBE
2. Choose Debug|Compile VBAProject

This doesn't "compile" the VBA project in the sense that you "compile" a VBA project, or more accurately a C or C++ program.

However, compiling the project in this manner creates p-code or whatever the heck it's called, which basically means that your code will work quicker straight out the box.

HTH
 
Upvote 0

Forum statistics

Threads
1,215,547
Messages
6,125,461
Members
449,228
Latest member
moaz_cma

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