Not sure if this helps, but....
I have a similar macro that I use to insert text / replace one if already there.
Here it is..
^C^C_osnap;off;zoom;11.85,1.775;16.025,-.3;_-insert;tmp;15.4,.15;;;;explode;L;erase;13.03,1.192;15.75,1.6;15.55,.2;15.25,.05;;_-PURGE;a;;n;-insert;asbuilt;13.35,1.25;;;;explode;L;
Basically all it does is insert a temporary 'tmp' block, then erase it and insert the NEW one.
This way the macro doesn't error out when you want to erase something that isn't there.
Hope this helps.
craigr