![]() |
Deleting Pictures
I have a large Excel spreadsheet with about 2000 pictures. I am writing a
VBA script to delete all of the pictures. the problem is identifying the ones to delete. If I Set myexcelworkbook = ActiveWorkbook then look in local windows, "Myexcelworkbook", "ActiveSheet", "Shapes" - I only get a list of 256 shapes with the names ranging "Picture 3" to Picture 259". What happend to the almost 2000 other pictures. I recorded macro and selected several and I have quite a few in the "Picture 2009" range. Am I looking the the wrong place to find the picture names so I can delete each one? Or better yet, is there an easier way to delete all pictures on my excel spreatsheet? Thanks |
Deleting Pictures
Do you have anything else on your worksheet? Perhaps you can use Edit--Go
to--Special--Objects? ******************* ~Anne Troy www.OfficeArticles.com www.MyExpertsOnline.com "brmauer" wrote in message ... I have a large Excel spreadsheet with about 2000 pictures. I am writing a VBA script to delete all of the pictures. the problem is identifying the ones to delete. If I Set myexcelworkbook = ActiveWorkbook then look in local windows, "Myexcelworkbook", "ActiveSheet", "Shapes" - I only get a list of 256 shapes with the names ranging "Picture 3" to Picture 259". What happend to the almost 2000 other pictures. I recorded macro and selected several and I have quite a few in the "Picture 2009" range. Am I looking the the wrong place to find the picture names so I can delete each one? Or better yet, is there an easier way to delete all pictures on my excel spreatsheet? Thanks |
Deleting Pictures
I figured it out. I used information from another post that I didn't see
earlier. I used something like: For Each shp In ActiveSheet.Shapes ActiveSheet.Shapes(shp.Name).Select Selection.Cut Next Thanks "brmauer" wrote: I have a large Excel spreadsheet with about 2000 pictures. I am writing a VBA script to delete all of the pictures. the problem is identifying the ones to delete. If I Set myexcelworkbook = ActiveWorkbook then look in local windows, "Myexcelworkbook", "ActiveSheet", "Shapes" - I only get a list of 256 shapes with the names ranging "Picture 3" to Picture 259". What happend to the almost 2000 other pictures. I recorded macro and selected several and I have quite a few in the "Picture 2009" range. Am I looking the the wrong place to find the picture names so I can delete each one? Or better yet, is there an easier way to delete all pictures on my excel spreatsheet? Thanks |
Deleting Pictures
Hi Brmauer,
A non-looping method: Sub Tester Activesheet.Pictures.Delete End sub --- Regards, Norman "brmauer" wrote in message ... I have a large Excel spreadsheet with about 2000 pictures. I am writing a VBA script to delete all of the pictures. the problem is identifying the ones to delete. If I Set myexcelworkbook = ActiveWorkbook then look in local windows, "Myexcelworkbook", "ActiveSheet", "Shapes" - I only get a list of 256 shapes with the names ranging "Picture 3" to Picture 259". What happend to the almost 2000 other pictures. I recorded macro and selected several and I have quite a few in the "Picture 2009" range. Am I looking the the wrong place to find the picture names so I can delete each one? Or better yet, is there an easier way to delete all pictures on my excel spreatsheet? Thanks |
All times are GMT +1. The time now is 11:01 AM. |
Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
ExcelBanter.com