Home |
Search |
Today's Posts |
|
#1
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
I know I can use ActiveSheet.DrawingObjects.Delete to delete all drawing
objects on a sheet. Is there a way to select all drawing objects EXCEPT for charts and text boxes (or anything else for that matter)? -- JNW |
#2
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
I have use this code befo
for each myshape in shapes if instr(ucase(myshape.name),"CHART") = 0 then msgbox(myshape.name) end if run code above once to make surre you are happy with the results. Then add myshape.delete into the code. "JNW" wrote: I know I can use ActiveSheet.DrawingObjects.Delete to delete all drawing objects on a sheet. Is there a way to select all drawing objects EXCEPT for charts and text boxes (or anything else for that matter)? -- JNW |
#3
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
Joel
Thanks for the reply. I'm not quite understanding what your code does. And it is erroring at the for next line. Thanks. -- JNW "Joel" wrote: I have use this code befo for each myshape in shapes if instr(ucase(myshape.name),"CHART") = 0 then msgbox(myshape.name) end if run code above once to make surre you are happy with the results. Then add myshape.delete into the code. "JNW" wrote: I know I can use ActiveSheet.DrawingObjects.Delete to delete all drawing objects on a sheet. Is there a way to select all drawing objects EXCEPT for charts and text boxes (or anything else for that matter)? -- JNW |
#4
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
Sub test()
Dim nType As Long Dim shp As Shape For Each shp In ActiveSheet.Shapes nType = shp.Type Select Case nType Case msoChart, msoTextBox ' inlcude "or anything else for that matter" not to delete Case Else shp.Delete End Select Next End Sub Regards, Peter T "JNW" wrote in message ... I know I can use ActiveSheet.DrawingObjects.Delete to delete all drawing objects on a sheet. Is there a way to select all drawing objects EXCEPT for charts and text boxes (or anything else for that matter)? -- JNW |
#5
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
You can use Type
See this page for a few examples http://www.rondebruin.nl/controlsobjectsworksheet.htm -- Regards Ron de Bruin http://www.rondebruin.nl/tips.htm "JNW" wrote in message ... I know I can use ActiveSheet.DrawingObjects.Delete to delete all drawing objects on a sheet. Is there a way to select all drawing objects EXCEPT for charts and text boxes (or anything else for that matter)? -- JNW |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
Delete 1 row of objects, not all on sheet Excel 2007 | Excel Discussion (Misc queries) | |||
delete objects | Excel Discussion (Misc queries) | |||
Delete Picture Objects | Excel Programming | |||
delete hyperlinks from graphical objects in excel sheet | Excel Programming | |||
Unable to remove Sheet objects in the Microsoft Excel Objects | Excel Programming |