Shapes In ActiveSheet

  • Thread starter Thread starter Tommi
  • Start date Start date
T

Tommi

Hello!
Can someone help me how I get all Shapes (which I am using as buttons for
macros) deleted in activesheet.
The problem is that I don't know the name of those Shapes. (There is also
Shapes in other sheets, which should not be deleted)

I thank you for your help!

BR,
Tommi
 
Tommi,

Try something like

Dim SH As Shape
For Each SH In ActiveSheet.Shapes
SH.Delete
Next SH



--
Cordially,
Chip Pearson
Microsoft MVP - Excel
Pearson Software Consulting, LLC
www.cpearson.com
 
Tommi,

Try this:

For each shp in ActiveSheet.Shapes
shp.Select
Selection.Delete
Next

Nikos
 
Hi Chip:

Interestingly,

ActiveSheet.Shapes.Delete

does not work, while:

ActiveSheet.DrawingObjects.Delete

does.

Why the difference? Aren't they equivalent? Help seems to refer to
DrawingObjects and Shapes interchangeably.

Regards,

Vasant.
 
Hi Tommi,
Shapes
http://www.mvps.org/dmcritchie/excel/shapes.htm
in case your question was not answered. I think you wanted to
identify the name of a shape.

You shoujld put your name (first & last) even when posting
with anonymous email address at least it is a bit more friendly
most of regulars also do use their real email address and do
deal with the spam to email with filters.

Newsgroup postings are archived, and if I wanted to see if anyone
replied to my post I could put (e-mail address removed) or
I could put "David McRitchie" in as author and limit to a date range
to find if anyone replied to my question.
http://www.mvps.org/dmcritchie/excel/xlnews.htm
 
Absolutely agree, and it seems to be on the increase. It is nice to know who
you are talking to.

Bob
 
Back
Top