Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Westi on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

VBAProject Protection with Code, How to??????

Status
Not open for further replies.

Scottflyer

IS-IT--Management
Mar 15, 2003
4
US
Hi:

I'm NOT interested in Worksheet or Workbook protection/unprotection as I know how to do that well. I'm interested in unprotecting and protecting the locked VBA Project itself that has been password protected from viewing. I want to update code in existing copies of the project using the .Remove and .Import methods from within the code of the project itself. For example:

With VBP.VBComponents
.Remove VBP.VBComponents("Module3")
.Remove VBP.VBComponents("Module5")
End With

Does not work unless the VBA Project (not the workbook or worksheet) is unprotected or open.

Can someone tell me how to unprotect and then protect the project, ideally from within the project? Thanks for any help you can give!

Scott
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top