Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 3
Default deleting all shapes and lines

Is there a quick and simple code to delete ALL shapes on a worksheet?
Thanks!
  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1,163
Default deleting all shapes and lines

Dim ThisShape as Shape
For Each ThisShape in Worksheets("SheetName").Shapes
ThisShape.Delete
Next ThisShape
--
- K Dales


"thadpole" wrote:

Is there a quick and simple code to delete ALL shapes on a worksheet?
Thanks!

  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 3
Default deleting all shapes and lines

Thank you!!! It worked, except it deleted all my buttons on the worksheet
too! I forgot buttons were actually shapes as well.


"K Dales" wrote:

Dim ThisShape as Shape
For Each ThisShape in Worksheets("SheetName").Shapes
ThisShape.Delete
Next ThisShape
--
- K Dales


"thadpole" wrote:

Is there a quick and simple code to delete ALL shapes on a worksheet?
Thanks!

  #4   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 11,123
Default deleting all shapes and lines

See the information on this page
http://www.rondebruin.nl/controlsobjectsworksheet.htm


--
Regards Ron de Bruin
http://www.rondebruin.nl


"thadpole" wrote in message ...
Thank you!!! It worked, except it deleted all my buttons on the worksheet
too! I forgot buttons were actually shapes as well.


"K Dales" wrote:

Dim ThisShape as Shape
For Each ThisShape in Worksheets("SheetName").Shapes
ThisShape.Delete
Next ThisShape
--
- K Dales


"thadpole" wrote:

Is there a quick and simple code to delete ALL shapes on a worksheet?
Thanks!



  #5   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 3
Default deleting all shapes and lines

Thanks, that will work too, especially if there are a lot of controls on the
sheet. Fortunately, I only have 2 controls so I inserted a simple...

If ThisShape.Name < "MyButtonName" then
ThisShape.Delete
End If


"Ron de Bruin" wrote:

See the information on this page
http://www.rondebruin.nl/controlsobjectsworksheet.htm


--
Regards Ron de Bruin
http://www.rondebruin.nl


"thadpole" wrote in message ...
Thank you!!! It worked, except it deleted all my buttons on the worksheet
too! I forgot buttons were actually shapes as well.


"K Dales" wrote:

Dim ThisShape as Shape
For Each ThisShape in Worksheets("SheetName").Shapes
ThisShape.Delete
Next ThisShape
--
- K Dales


"thadpole" wrote:

Is there a quick and simple code to delete ALL shapes on a worksheet?
Thanks!




Reply
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
Deleting Shapes aftamath Excel Discussion (Misc queries) 5 November 5th 05 12:37 AM
Deleting Shapes in a worksheet Glen Mettler[_4_] Excel Programming 8 July 11th 05 11:32 AM
Deleting shapes in an area Tim Excel Programming 2 October 27th 04 08:51 PM
Deleting shapes Dr.Schwartz Excel Programming 1 October 15th 04 10:18 AM
Deleting shapes Steve Excel Programming 4 June 16th 04 05:23 PM


All times are GMT +1. The time now is 09:35 PM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"