You are on page 1of 1

Add the reference Microsoft Visual Basic For Applications Extensibility Library and use the following statement

somewhere other than in UserForm1 to delete UserForm1:

ThisWorkbook.VBProject.VBComponents.Remove ThisWorkbook.VBProject.VBComponents("UserForm1")

You might also like