After using VBA to add a worksheet (see previous post) I want to add a line to the code to delete the Command Button on the copied sheet (the button will remain on the “template”).

Can someone help me as to how this is done, please?

Regards

Theres a newer thread related to this topic! Check it out here: Unable to Delete Specific Buttons

Wow, well done Michael.

Is any question too hard for you?

With thanks,
Steve

Steve,

The secret is that a commandbutton is a “shape” on a worksheet. Therefore, you need to delete it from the Shapes collection:

ActiveSheet.Shapes(“CommandButton1”).Delete

Michael S. Meyers-Jouan

Thanks for sharing secret!