Delete pictures in spreadsheet

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

How can I get rid of a company logo that I imported into my spreadsheet
several years ago and has grown to over 45000 duplications (layered). It has
grown from repeated copy and paste functions while using the spreadsheet. I'm
using Excel 97 and can't find a delete tab. Thanks.
 
This macro will delete all shapes in the active workbook:

Sub DelAllShapes()
Dim Shp As Shape, WS As Worksheet
On Error Resume Next
'Check every worksheet in the workbook
For Each WS In ActiveWorkbook.Worksheets
WS.Activate
'Delete any other shapes on the sheet.
For Each Shp In ActiveSheet.Shapes
Shp.Delete
Next Shp
Next WS
End Sub

If you're new to macros, you may want to read David McRitchie's intro at:
http://www.mvps.org/dmcritchie/excel/getstarted.htm

Hope this helps,

Hutch
 
Thanks, Hutch. The macro worked great!
Seedman

Tom Hutchins said:
This macro will delete all shapes in the active workbook:

Sub DelAllShapes()
Dim Shp As Shape, WS As Worksheet
On Error Resume Next
'Check every worksheet in the workbook
For Each WS In ActiveWorkbook.Worksheets
WS.Activate
'Delete any other shapes on the sheet.
For Each Shp In ActiveSheet.Shapes
Shp.Delete
Next Shp
Next WS
End Sub

If you're new to macros, you may want to read David McRitchie's intro at:
http://www.mvps.org/dmcritchie/excel/getstarted.htm

Hope this helps,

Hutch
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Back
Top