Delete a Macro

S

Steven

Is there a way to create a macro that deletes other macros
and / or deletes modules?

Thank you,

Steven
 
A

Amedee Van Gasse

Chip said:
Steven,

See www.cpearson.com/excel/vbe.htm for details and example code.

Chip,

If McAfee VirusScan ASaP is installed, this won't work.
McAfee is very effective at zapping the entire code module when you
have a line of code that changes the VBA project. More precisely,
McAfee considers the following methods as possible viral actions:

VBComponents.Add
VBComponents.Remove
VBComponents.Import
CodeModule.InsertLines
CodeModule.DeleteLines

I don't know about other McAfee products or AV products from other
companies, but I think a precautionary warning on your website might be
appropriate.
 
Top