1Big_Daddy
New Member
- Joined
- Jul 25, 2007
- Messages
- 5
I have found a way to delete the module the particular macro is in:
Sub DeleteCopyLog()
Dim vbCom As Object
Set vbCom = Application.VBE.ActiveVBProject.VBComponents
vbCom.Remove VBComponent:=vbCom.Item("Module4")
End Sub
However, the code that calls the particular macro I'm deleting reamins in the master macro. When, and if, the user runs the master macro again the error msgbox: "Sub or function not defined" appears!
Can anyone help???
Thanks
Sub DeleteCopyLog()
Dim vbCom As Object
Set vbCom = Application.VBE.ActiveVBProject.VBComponents
vbCom.Remove VBComponent:=vbCom.Item("Module4")
End Sub
However, the code that calls the particular macro I'm deleting reamins in the master macro. When, and if, the user runs the master macro again the error msgbox: "Sub or function not defined" appears!
Can anyone help???
Thanks