Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 84
Default deleting pictures

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   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 2,824
Default deleting pictures

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   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 27,285
Default deleting pictures

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
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 pictures from multiple worksheets dford Excel Discussion (Misc queries) 2 December 24th 06 04:43 AM
Excel's Compress Pictures or deleting pictures doesn't seem work guidod Excel Discussion (Misc queries) 1 January 29th 06 06:51 AM
deleting 100's of pictures, keep data jsc3489 Excel Worksheet Functions 9 June 16th 05 10:43 PM
deleting 100's of pictures, keep data jsc3489 Excel Worksheet Functions 0 June 8th 05 07:54 PM
Deleting pictures using VBA?? Richard1284 Excel Programming 3 May 23rd 04 04:19 PM


All times are GMT +1. The time now is 06:07 PM.

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

About Us

"It's about Microsoft Excel"