Can I strip the code from a VBA module and still have it function? The template contains code in a module and user forms as well. I would prefer that the code be hidden when I distribute it.
- Linda
Can I strip the code from a VBA module and still have it function? The template contains code in a module and user forms as well. I would prefer that the code be hidden when I distribute it.
- Linda

This month, every Windows Secrets subscriber can download a one-chapter excerpt of Windows 7: The Missing Manual.Windows 7: The Missing Manual provides valuable information to help you overcome these difficulties in learning a new operating system. Subscribe today to download your free excerpt.
The module is just a container for the code, so no, it won't work if you strip the code out.
If you want to protect the code in your modules and behind any userforms, you can do that from the VB editor. From the Tools menu there, select the project properties and you'll see a Protection tab. There's a checkbox on that tab that lets you protect the code so it can't be seen and you can enter a password so that you can still get into it when necessary. If you use it, though, be very sure you build in all the error handling you need first.
Charlotte
Exactly what I was looking for! Thank you very much!
- Linda