View Single Post
  #2   Report Post  
Posted to microsoft.public.excel.misc
Chip Pearson
 
Posts: n/a
Default Unprotect Code Module in Code

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


"Damien" wrote in message
...
Can you protect / unprotect a VBA code module in code? eg

ActiveWorkbook.VBProject.VBComponents("Module1").P roperties("Password")
=
"test"

Thanks