Avatar of Milan Soni
Milan Soni
 asked on

How to hide/lock macro and its codes?

I want to provide the user with the macro in an excel but I do not want them to see my macro codes, is it possible? if yes please suggest.

I want to implement this in Excel and word application both.
Microsoft OfficeVB ScriptVBAMicrosoft ExcelMicrosoft Applications

Avatar of undefined
Last Comment
Milan Soni

8/22/2022 - Mon
ASKER CERTIFIED SOLUTION
Shums Faruk

THIS SOLUTION ONLY AVAILABLE TO MEMBERS.
View this solution by signing up for a free trial.
Members can start a 7-Day free trial and enjoy unlimited access to the platform.
See Pricing Options
Start Free Trial
GET A PERSONALIZED SOLUTION
Ask your own question & get feedback from real experts
Find out why thousands trust the EE community with their toughest problems.
Rob Henson

In the Visual Basic Editor you can protect each module with a password. By doing so only users that know the password can open the module.

This is a limited form of protection as Excel passwords are not the most secure but it would stop any casual prying.
Martin Liss

To protect the code, open the Excel Workbook and go to Tools>Macro>Visual Basic Editor (Alt+F11). Now, from within the VBE go to Tools>VBAProject Properties and then click the Protection page tab and then check "Lock project from viewing" and then enter your password and again to confirm it.
Milan Soni

ASKER
This was helpful.
Experts Exchange has (a) saved my job multiple times, (b) saved me hours, days, and even weeks of work, and often (c) makes me look like a superhero! This place is MAGIC!
Walt Forbes