Courtesy of the website ozgrid.com I found code which could delete a module
Dim vbCom As Object
Set vbCom = Application.VBE.ActiveVBProject.VBComponents
vbcom.delete vbcom.item("Module2")
But I have no idea how you are going to be able to use it within a module as
VBProject does not expose its passwords properties to the outside for obvious
reasons.