Here is an example
Dim VBComp As Object
MsgBox "hello"
Set VBComp = ThisWorkbook.VBProject.vbcomponents("Module2")
ThisWorkbook.VBProject.vbcomponents.Remove VBComp
--
HTH
Bob Phillips
... looking out across Poole Harbour to the Purbecks
(remove nothere from the email address if mailing direct)
"lostthought " wrote in message
...
I have a program that has multiple userforms. I want to build a program
that removes one and replaces it with another. I know how to import in
the new userform, but can't seem to remove the old one. Does anybody
know the proper coding for removing a userform?
---
Message posted from http://www.ExcelForum.com/