Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.excel.programming
|
|||
|
|||
Deleting shapes
How can I programatically select and delete x number of shapes in a sheet?
I tried this with no luck: ActiveSheet.Shapes.Select Selection.Delete Thanks The Doctor |
#2
Posted to microsoft.public.excel.programming
|
|||
|
|||
Deleting shapes
Doc
This could depend on how many you want to delete or if there are only certain types of shape to delete To delete all, try:- Dim shp As Shape For Each shp In ActiveSheet.Shapes shp.Delete Next To delete by name/type try this for AutoShapes only, assuming shapes haven't been renamed:- Dim shp As Shape For Each shp In ActiveSheet.Shapes If shp.Name Like "AutoShape*" Then shp.Delete End If Next Happy Friday ;-) Dr.Schwartz wrote in message ... How can I programatically select and delete x number of shapes in a sheet? I tried this with no luck: ActiveSheet.Shapes.Select Selection.Delete Thanks The Doctor |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
Naming Auto Shapes and Creating new Shapes | Excel Discussion (Misc queries) | |||
When drawing shapes in excel the shapes keep disappearing | Excel Discussion (Misc queries) | |||
Deleting Shapes | Excel Discussion (Misc queries) | |||
Deleting shapes | Excel Programming | |||
Deleting shapes crashes for me. (Excel 97 vba) | Excel Programming |