Remove UserForm

  • Thread starter Thread starter lostthought
  • Start date Start date
L

lostthought

I have a program that has multiple userforms. I want to build a progra
that removes one and replaces it with another. I know how to import i
the new userform, but can't seem to remove the old one. Does anybod
know the proper coding for removing a userform
 
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)
 
Thanks for the Help......finally a site with people who are actuall
helpful
 
Thanks for the Help......finally a site with people who are actuall
helpful
 
Glad to help

--

HTH

Bob Phillips
... looking out across Poole Harbour to the Purbecks
(remove nothere from the email address if mailing direct)
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Back
Top