ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Programming (https://www.excelbanter.com/excel-programming/)
-   -   Delete a Macro (https://www.excelbanter.com/excel-programming/305038-delete-macro.html)

Steven

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

Thank you,

Steven

Chip Pearson

Delete a Macro
 
Steven,

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


--
Cordially,
Chip Pearson
Microsoft MVP - Excel
Pearson Software Consulting, LLC
www.cpearson.com


"Steven" wrote in message
...
Is there a way to create a macro that deletes other macros
and / or deletes modules?

Thank you,

Steven




Amedee Van Gasse[_3_]

Delete a Macro
 
Chip Pearson wrote:

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.

--
Amedee Van Gasse
To top-post is human, to bottom-post and snip is sublime.


All times are GMT +1. The time now is 03:43 PM.

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