MrExcel Publishing
Your One Stop for Excel Tips & Solutions

Deleting button "remnants"...


Posted by Bill Tanner on March 29, 2000 9:21 AM

Had several buttons used to run macros. Decided to delete them and, rather than clicking on each button individually and deleting each separately, I chose to delete maybe 20 rows from the worksheet. The plan was to delete 4 buttons at the same time.

Problem is that the buttons weren't deleted. Instead they became so skinny from top to bottom that it's no longer possible to select them and delete them. Didn't notice the problem until after saving so can't undo. Tried inserting 20 rows so as to (are you ready?) "reinflate" the buttons. Nice try ace.

So how do I grab hold of (select) the silly things long enough that I can delete them?

Oh stop laughing, it could have happened to you...

:-)

Bill Tanner


Posted by Keith on March 29, 2000 11:34 AM

Try one of these commands:

To hide buttons:

ActiveSheet.Shapes("Button 1").Visible = False
ActiveSheet.Shapes("Button 2").Visible = False

To remove buttone:

ActiveSheet.Shapes("Button 1").Delete
ActiveSheet.Shapes("Button 2").Delete

If you do not know the button number you may have to cycle through the "Shapes Collection Object", or, possibly, use the SelectAll method. (Activesheet.Shapes.SelectAll).

HTH, Keith

Posted by Celia on March 29, 2000 3:58 PM

Bill
As an alternative to Keith's solution, you can also do it by selecting Edit/Go To.../Special/Objects and then hold down Shift+Ctrl and select Edit/Cut
Celia