Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1,236
Default deleting code by macro

Sorry - one more thing. This requires a Reference to "Microsoft Visual Basic
for Applications Extensibility"

--
Rob van Gelder - http://www.vangelder.co.nz/excel


"Rob van Gelder" wrote in message
news:...
Later versions of Excel have Macro Security which prevent this sort of
activity without having been trusted.

Sub test()
Dim vbc As VBComponent

For Each vbc In ActiveWorkbook.VBProject.VBComponents
vbc.CodeModule.DeleteLines 1, vbc.CodeModule.CountOfLines
Next
End Sub


--
Rob van Gelder - http://www.vangelder.co.nz/excel


"jriehl" wrote in message
...
Hi there,

is it possible to delete all of a workbooks code automatically by means

of
a
macro?

Lots of thanks

Jürgen






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
Deleting code from a macro (by a macro) Brettjg Excel Discussion (Misc queries) 2 May 8th 07 10:14 PM
deleting code by macro jriehl Excel Programming 2 June 29th 04 09:43 AM
Deleting code in a file with code.. KimberlyC Excel Programming 3 March 4th 04 09:24 PM
visual basic macro code for deleting referenced rows mudraker[_132_] Excel Programming 3 January 29th 04 05:01 PM
visual basic macro code for deleting referenced rows Frank Kabel Excel Programming 0 January 28th 04 10:05 PM


All times are GMT +1. The time now is 02:19 PM.

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

About Us

"It's about Microsoft Excel"