You can embed VBA macros in a DWG file and in some situations, you might feel the need to get rid of the embedded macros.
If so, the following lisp routine will help you remove the embedded macro:
(defun removeEmbedMacro()
(entdel (cdr(car (dictsearch (namedobjdict) "ACAD_VBA"))))
)
In this lisp routine, we remove the dictionary item “ACAD_VBA” in the Named Object Dictionary. This is because embedded macros live under the ACAD_VBA dictionary item.