Unprotect Code Module in Code

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

Can you protect / unprotect a VBA code module in code? eg

ActiveWorkbook.VBProject.VBComponents("Module1").Properties("Password") =
"test"

Thanks
 
You can't protect a single VBComponent. You can protect only the
entire project, and this cannot be done with VBA (unless you
resort to the dreaded SendKeys).


--
Cordially,
Chip Pearson
Microsoft MVP - Excel
Pearson Software Consulting, LLC
www.cpearson.com
 
OK Chip,

have you got any examples of doing that with SendKeys? I could try and work
it out but if it's already been done ...
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Back
Top