Home |
Search |
Today's Posts |
|
#1
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
somehow i used the drag tool and copied about 10000 pictures. is there a way
to delete them all without individually selecting the pictures? the pictures are named from picture 118-17596. is there a way to use a loop function that will delete these pictures? or select them like selecting multiple cells? please help thanks in advance |
#2
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
It sounds like you want to keep some of the pictures.
So if that's true and your pictures are named nicely (like you wrote), maybe a little macro will do it: Option Explicit Sub testme() Dim myShape As Shape Dim myStr As String For Each myShape In ActiveSheet.Shapes myStr = LCase(myShape.Name) If Left(myStr, 8) = "picture " Then myStr = Application.Substitute(myStr, "picture", "") If CLng(myStr) 118 Then myShape.Delete End If End If Next myShape End Sub Save before you try it--then you can close without saving if it's not correct. If you're new to macros, you may want to read David McRitchie's intro at: http://www.mvps.org/dmcritchie/excel/getstarted.htm choice wrote: somehow i used the drag tool and copied about 10000 pictures. is there a way to delete them all without individually selecting the pictures? the pictures are named from picture 118-17596. is there a way to use a loop function that will delete these pictures? or select them like selecting multiple cells? please help thanks in advance -- Dave Peterson |
#3
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
Activesheet.Pictures.Delete
if you don't have any activeX controls on the sheet. -- Regards, Tom Ogilvy "choice" wrote in message ... somehow i used the drag tool and copied about 10000 pictures. is there a way to delete them all without individually selecting the pictures? the pictures are named from picture 118-17596. is there a way to use a loop function that will delete these pictures? or select them like selecting multiple cells? please help thanks in advance |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
Deleting pictures from multiple worksheets | Excel Discussion (Misc queries) | |||
Excel's Compress Pictures or deleting pictures doesn't seem work | Excel Discussion (Misc queries) | |||
deleting 100's of pictures, keep data | Excel Worksheet Functions | |||
deleting 100's of pictures, keep data | Excel Worksheet Functions | |||
Deleting pictures using VBA?? | Excel Programming |