Hi StephenT
Try this if "Trust access to VBA project object model" is checked if the macro is in Module1
Sub RunMacroAndDeletModule()
MsgBox "By module1"
With ThisWorkbook.VBProject.VBComponents
.Remove .Item("Module1")
End With
End Sub
--
Regards Ron de Bruin
http://www.rondebruin.nl/tips.htm
"StephenT" wrote in message ...
Hello, I have written a macro to clean my workbook before publishing, and I
would like to delete a macro using this macro.
Can someone please help with the code to delete a macro?
This won't break the internet will it?