Delete macro automatic

A

Ad Stam

Is it possible to delete single macro's within a module.
I'v already found Application.OrganizerDelete, but this
wil delete an entire module.
 
J

Jezebel

It's a fairly complex object model, but you can get to -- and manipulate --
the code in a module with a reference like

application.VBE.VBProjects(1).VBComponents(1).CodeModule

where VBProjects and VBComponents correspond to the elements in the VBE
project window. You don't delete the macro as such -- rather you select the
lines of code in the module that contain the macro, and delete those lines.
Read help for the details.
 
Top