ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Programming (https://www.excelbanter.com/excel-programming/)
-   -   Deleting a module (https://www.excelbanter.com/excel-programming/305823-deleting-module.html)

Frank Kabel

Deleting a module
 
Hi
see:
http://www.cpearson.com/excel/vbe.htm

--
Regards
Frank Kabel
Frankfurt, Germany


Grant Reid wrote:
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



Ron de Bruin

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





Grant Reid

Deleting a module
 
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



Grant Reid

Deleting a module
 
Hi

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

Kind Regards - Grant




All times are GMT +1. The time now is 10:54 PM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
ExcelBanter.com