View Single Post
  #2   Report Post  
Posted to microsoft.public.excel.programming
Ron de Bruin Ron de Bruin is offline
external usenet poster
 
Posts: 11,123
Default Deleting a module

Hi Grant

Try this

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



--
Regards Ron de Bruin
http://www.rondebruin.nl


"Grant Reid" wrote in message ...
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