Hi All,
I currently have some code which accesses a list of workbooks, manipulates them etc.
I also want this to remove all VB modules within them to which i have the below code(snipped):
Dim Element As Object
For Each Element In wb2.VBProject.VBComponents
wb2.VBProject.VBComponents.Remove Element
Next
This doesn't seem to work as the modules it is attempting to remove are within a password protected project.I do know the password but i am unsure as to how to input this within the code if at all possible if anyone can assist.
Apologies if this makes no sense.
Thanks,
I currently have some code which accesses a list of workbooks, manipulates them etc.
I also want this to remove all VB modules within them to which i have the below code(snipped):
Dim Element As Object
For Each Element In wb2.VBProject.VBComponents
wb2.VBProject.VBComponents.Remove Element
Next
This doesn't seem to work as the modules it is attempting to remove are within a password protected project.I do know the password but i am unsure as to how to input this within the code if at all possible if anyone can assist.
Apologies if this makes no sense.
Thanks,