ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Programming (https://www.excelbanter.com/excel-programming/)
-   -   Shapes In ActiveSheet (https://www.excelbanter.com/excel-programming/284115-shapes-activesheet.html)

Tommi[_2_]

Shapes In ActiveSheet
 
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



Chip Pearson

Shapes In ActiveSheet
 
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" wrote in message
...
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





No Name

Shapes In ActiveSheet
 
Tommi,

Try this:

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

Nikos
-----Original Message-----
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


.


Vasant Nanavati

Shapes In ActiveSheet
 
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.


"Chip Pearson" wrote in message
...
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" wrote in message
...
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







david mcritchie

Shapes In ActiveSheet
 
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 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
---
HTH,
David McRitchie, Microsoft MVP - Excel [site changed Nov. 2001]
My Excel Pages: http://www.mvps.org/dmcritchie/excel/excel.htm
Search Page: http://www.mvps.org/dmcritchie/excel/search.htm

wrote in message ...
Tommi,

Try this:

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

Nikos
-----Original Message-----
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


.




Bob Phillips[_6_]

Shapes In ActiveSheet
 
Absolutely agree, and it seems to be on the increase. It is nice to know who
you are talking to.

Bob

"David McRitchie" wrote in message
...
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 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
---
HTH,
David McRitchie, Microsoft MVP - Excel [site changed Nov. 2001]
My Excel Pages: http://www.mvps.org/dmcritchie/excel/excel.htm
Search Page: http://www.mvps.org/dmcritchie/excel/search.htm

wrote in message

...
Tommi,

Try this:

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

Nikos
-----Original Message-----
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


.







All times are GMT +1. The time now is 11:37 PM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
ExcelBanter.com