Deleting a module

  • Thread starter Thread starter Frank Kabel
  • Start date Start date
Hi Grant

Try this

Sub test()
With ThisWorkbook.VBProject.VBComponents
.Remove .Item("Module2")
End With
End Sub
 
Hi

I have a workbook with two modules. Is there any way that I can
programatically remove module 2 from a routine invoked from module 1?

Hope someone can help?

Many Thanks - Grant
 
Hi

Many thanks, Ron and Frank, for the help. As usual it was spot on

Kind Regards - Grant
 

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