All,
I am looking for some code that will allow me to go in and delete all
"Picture" objects from within a worksheet without deleting the rest of the
data. Is this possible?
Regards,
Nathan
All,
I am looking for some code that will allow me to go in and delete all
"Picture" objects from within a worksheet without deleting the rest of the
data. Is this possible?
Regards,
Nathan
various ways
Sub ShapesCut()
For Each S In ActiveSheet.Shapes
S.Cut
Next
End Sub
'or
Sub shapescut1() 'Tom Ogilvy
ActiveSheet.Shapes.SelectAll
Selection.Delete
End Sub
Sub ShapesALLinWorkbookDelete() 'Deletes all in WORKBOOK
Dim sh As Worksheet
For Each sh In ActiveWorkbook.Worksheets
sh.DrawingObjects.Delete
Next sh
end sub
--
Don Guillett
SalesAid Software
[email protected]
"Nathan Bell" <[email protected]> wrote in message
news:%[email protected]...
> All,
>
> I am looking for some code that will allow me to go in and delete all
> "Picture" objects from within a worksheet without deleting the rest of the
> data. Is this possible?
>
> Regards,
>
> Nathan
>
>
Nathan,
ActiveSheet.DrawingObjects.Delete
Or simply use Edit | Go To... Objects, press OK, then Delete.
HTH,
Bernie
MS Excel MVP
"Nathan Bell" <[email protected]> wrote in message
news:%[email protected]...
> All,
>
> I am looking for some code that will allow me to go in and delete all
> "Picture" objects from within a worksheet without deleting the rest of the
> data. Is this possible?
>
> Regards,
>
> Nathan
>
>
If you want to delete only Pictures, but not other shapes, such as text
boxes, you can use code similar to the following:
'======================
Sub DeletePictures()
Dim shp As Shape
For Each shp In ActiveSheet.ShapeRange
If shp.Type = msoPicture Then
shp.Delete
End If
Next shp
End Sub
'=====================
Nathan Bell wrote:
> All,
>
> I am looking for some code that will allow me to go in and delete all
> "Picture" objects from within a worksheet without deleting the rest of the
> data. Is this possible?
>
> Regards,
>
> Nathan
>
>
--
Debra Dalgleish
Excel FAQ, Tips & Book List
http://www.contextures.com/tiptech.html
There are currently 1 users browsing this thread. (0 members and 1 guests)
Bookmarks