Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 3
Default Deleting macro

Hi,

is it possible to delete a macro in VBA code??? If yes, what's the code???

Thanks
Stephane
  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 340
Default Deleting macro

You can do it with code like the following:

With ThisWorkbook.VBProject.VBComponents("Module1").Cod eModule
.DeleteLines .ProcStartLine("MacroName", 0), _
.ProcCountLines("MacroName", 0)
End With

If you are using Excel 2002 or 2003, you will need to manually tell Excel to
trust macro modifications of vba code. I believe it is found via Tools,
Macros. Set back when done.

Bob Flanagan
Macro Systems
http://www.add-ins.com
Productivity add-ins and downloadable books on VB macros for Excel


"Stephane" wrote in message
om...
Hi,

is it possible to delete a macro in VBA code??? If yes, what's the code???

Thanks
Stephane



  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 3,885
Default Deleting macro

Hi
in addition to Bob's answer you may also take a look at
http://www.cpearson.com/excel/vbe.htm

-----Original Message-----
Hi,

is it possible to delete a macro in VBA code??? If yes,

what's the code???

Thanks
Stephane
.

  #4   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 22,906
Default Deleting macro

Stephane

Chip Pearson has the code.

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

Gord Dibben Excel MVP

On 4 May 2004 08:55:04 -0700, (Stephane) wrote:

Hi,

is it possible to delete a macro in VBA code??? If yes, what's the code???

Thanks
Stephane


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
Macro for Deleting Worksheets andiam24 Excel Discussion (Misc queries) 2 April 2nd 09 03:47 PM
Deleting code from a macro (by a macro) Brettjg Excel Discussion (Misc queries) 2 May 8th 07 10:14 PM
Deleting Row Macro Steve M Excel Worksheet Functions 4 April 20th 06 03:42 PM
Deleting a macro scottech Excel Discussion (Misc queries) 5 December 5th 05 05:02 PM
Macro is deleting everything! vmagal1 Excel Discussion (Misc queries) 3 April 25th 05 06:05 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"