Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 11,272
Default Remove ThisWorkbook code via VBA

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
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
2007 View Code ThisWorkbook KC hotmail com> Excel Discussion (Misc queries) 2 February 24th 10 09:07 PM
Deleting Code in 'ThisWorkbook' Ken Loomis Excel Programming 4 March 25th 05 01:36 PM
Stop execution of ThisWorkBook Code Anirban Excel Programming 1 November 20th 04 12:54 AM
Importing Code into 'ThisWorkbook' Mark Excel Programming 3 April 16th 04 03:29 PM
Delete the code in ThisWorkbook Darrin Henry Excel Programming 1 October 1st 03 11:10 PM


All times are GMT +1. The time now is 09:17 AM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
Copyright ©2004-2025 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"