ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Programming (https://www.excelbanter.com/excel-programming/)
-   -   Removing code in 'This Workbook' (https://www.excelbanter.com/excel-programming/326519-removing-code-workbook.html)

Mark

Removing code in 'This Workbook'
 
I am using Excel 97.

I am wanting to progammatically remove the code in the 'This workbook' module.

Can anyone assist with some code please?

Thanks

--
Mark

Shailesh Shah[_2_]

Removing code in 'This Workbook'
 
Hi Mark,

See topic "Deleting All Code From A Module" from Chip Pearson's Site

http://www.cpearson.com/excel/vbe.htm



Regards,
Shah Shailesh
http://members.lycos.co.uk/shahweb/


*** Sent via Developersdex http://www.developersdex.com ***

Bob Phillips[_6_]

Removing code in 'This Workbook'
 
Sub Rid()
With ThisWorkbook.VBProject.VBComponents("ThisWorkbook" ).CodeModule
.DeleteLines 1, .CountOfLines
End With
End Sub


--

HTH

RP
(remove nothere from the email address if mailing direct)


"Mark" wrote in message
...
I am using Excel 97.

I am wanting to progammatically remove the code in the 'This workbook'

module.

Can anyone assist with some code please?

Thanks

--
Mark





All times are GMT +1. The time now is 04:20 AM.

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