Scottflyer
IS-IT--Management
Hi:
In VBA in Excel, does anyone know how to protect/unprotect the VBA project (not workbooks or worksheets) from within a code segment in a project? I want to modify a protected project using the .Remove and .Import methods but need to uprotect the modules before removing the old ones and then importing the new ones. E.g.
With VBP.VBComponents
.Remove VBP.VBComponents("Module3"
.Remove VBP.VBComponents("Module5"
End With
An error is thrown if this is attempted when the project is closed and protected. If open or unprotected, it works every time.
Thanks a lot for any help!!!!
Scottflyer
In VBA in Excel, does anyone know how to protect/unprotect the VBA project (not workbooks or worksheets) from within a code segment in a project? I want to modify a protected project using the .Remove and .Import methods but need to uprotect the modules before removing the old ones and then importing the new ones. E.g.
With VBP.VBComponents
.Remove VBP.VBComponents("Module3"
.Remove VBP.VBComponents("Module5"
End With
An error is thrown if this is attempted when the project is closed and protected. If open or unprotected, it works every time.
Thanks a lot for any help!!!!
Scottflyer