• We’re currently investigating an issue related to the forum theme and styling that is impacting page layout and visual formatting. The problem has been identified, and we are actively working on a resolution. There is no impact to user data or functionality, this is strictly a front-end display issue. We’ll post an update once the fix has been deployed. Thanks for your patience while we get this sorted.

Help me with Excel

UlricT

Golden Member
I am working on standardizing some documents, and there are a LOT of unnecessary embedded images that have been resized to a line to make it disappear from the .xls file. Is there a way to list these out, or select all of them so I can modify/delete them?
 
Just to be safe, you should probably do the following to a copy of your workbook.

To list all of the shapes on a worksheet, place the following code in a VBA module in your workbook:

Sub ListAllShapes()
Dim S As Shape
Dim i As Integer
i = 1
For Each S In ActiveSheet.Shapes
Range("Sheet3!A" & Trim(Str(i))).Value = S.Name
i = i + 1
Next
End Sub

Then go to Tools --> Macro --> Macros and run the ListAllShapes macro. It will cycle through all of the shapes on the active worksheet and list their names in column A of Sheet3. You will probably want to change the "Sheet3!A" string to something like "MySheetName!A" where MySheetName is the name of a blank worksheet.

If you just want to do a wholesale (and undoable) deletion, then you can use this code instead:

Sub DeleteAllShapes()
Dim S As Shape
For Each S In ActiveSheet.Shapes
S.Delete
Next
End Sub
 
Back
Top