Before using these procedures, you'll need to
go into the VBA editor, go to the Tools menu,
choose the References item, and put a check
next to "Microsoft Visual Basic For
Applications Extensibility" library.
Sub delModule()
Dim VBComp As VBComponent
Set VBComp = ThisWorkbook.VBProject.VBComponents("Module1"
ThisWorkbook.VBProject.VBComponents.Remove VBComp
End Sub
Sub delForm()
Dim VBComp As VBComponent
Set VBComp = ThisWorkbook.VBProject.VBComponents("UserForm1"
ThisWorkbook.VBProject.VBComponents.Remove VBComp
This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
By continuing to use this site, you are consenting to our use of cookies.