- Go to Visual Basic Editor by pressing Alt+F11 key.
- In menu toolbar, click Tools -> VBAProject Properties...
- In VBAProject - Properties dialog box, click Protection tab, and then check Lock project for viewing checkbox.
- Enter desired password to protect VBA project, then click OK button.
- Save the VBA project.
Related Post:
---
If you like posts in this blog, you can to support me :)
I am writing an application which programmatically creates a userform, then deletes it later. Excel seems to require access to the project in unprotected mode to accomplish this. Commercial software would always be distributed with project protection on. These two requirements seem to be at odds with each other, as there appears to be no reliable and simple way to unlock the project, perform the required functions, then lock it again. Hoping you might have some clues.
ReplyDelete