\n\nSub Remove(ByVal MacroName As String)\n Dim vbc As VBComponent\n Dim MyMacro As String\n\n Set vbc = VBE.ActiveVBProject.VBComponents("ThisDocument")\n With vbc.CodeModule\n .DeleteLines .ProcStartLine(MacroName, vbext_pk_Proc), _\n .ProcCountLines(MacroName, vbext_pk_Proc)\n End With\n\nEnd Sub\n