Home |
Search |
Today's Posts |
|
#1
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
Using a macro, is it possible to remove the VBA code that exist in
ThisWorkbook? Thanks, Paul |
#2
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
Paul,
Try something like With ThisWorkbook.VBProject.VBComponents("ThisWorkbook" ).CodeModule .DeleteLines 1, .CountOfLines End With -- Cordially, Chip Pearson Microsoft MVP - Excel Pearson Software Consulting, LLC www.cpearson.com "PCLIVE" wrote in message ... Using a macro, is it possible to remove the VBA code that exist in ThisWorkbook? Thanks, Paul |
#3
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
Thats's perfect!
Thanks, Paul "Chip Pearson" wrote in message ... Paul, Try something like With ThisWorkbook.VBProject.VBComponents("ThisWorkbook" ).CodeModule .DeleteLines 1, .CountOfLines End With -- Cordially, Chip Pearson Microsoft MVP - Excel Pearson Software Consulting, LLC www.cpearson.com "PCLIVE" wrote in message ... Using a macro, is it possible to remove the VBA code that exist in ThisWorkbook? Thanks, Paul |
#4
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
Paul,
Give this a whirl Function DeleteModule() Dim vbMod As Object Set vbMod = ActiveWorkbook.VBProject.VBComponents("ThisWorkboo k") With vbMod.CodeModule .DeleteLines 1, .CountOfLines End With End Function -- HTH RP (remove nothere from the email address if mailing direct) "PCLIVE" wrote in message ... Using a macro, is it possible to remove the VBA code that exist in ThisWorkbook? Thanks, Paul |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
2007 View Code ThisWorkbook | Excel Discussion (Misc queries) | |||
Deleting Code in 'ThisWorkbook' | Excel Programming | |||
Stop execution of ThisWorkBook Code | Excel Programming | |||
Importing Code into 'ThisWorkbook' | Excel Programming | |||
Delete the code in ThisWorkbook | Excel Programming |