Sub DeleteModule()
Dim VBComp As VBComponent
Set VBComp = ThisWorkbook.VBProject.VBComponents("NewModule")
ThisWorkbook.VBProject.VBComponents.Remove VBComp
End Sub
You need to have the Microsoft Visual Basic For Application
Extensibility library activated in your references
--
ehnt
-----------------------------------------------------------------------
ehntd's Profile:
http://www.excelforum.com/member.php...fo&userid=1586
View this thread:
http://www.excelforum.com/showthread.php?threadid=27515