Programatically Delete command button and code.
I have a command button on a worksheet which has code associated with the
worksheet. How to delete the control and code from another macro? The reason
is this control is on a worksheet that is copied to another workbook. Once
the copy is done, I want to delete the control and code so the target
worksheet won't display the Security Warning about macros when it is opened.
I've seen some hints at it in other posts on how to delete code and
controls, but can't quite translate them to my situation.
Any help is appreciated.
|