Unable to delete Images. (Ghost Images!)

Craig_C

New Member
Joined
Mar 17, 2023
Messages
9
Office Version
  1. 365
Platform
  1. Windows
Hi All,

I have a large excel file with multiple TABS and various formulas all working to update a main summary page. On that page there were images that I deleted. However, every time I save and re-open the file, the images re-appear. They can not be clicked on and cannot be deleted. I have tried the following fixes:

a) Go to objects on the sheet (excel says there isn't any)
b) Add a new TAB or click on / off problematic tab. This works, and the images disappear but only until I save and re-open.
c) Searched for picture lookup, but there are no external links
d) Check VBA - nothing appears out of the ordinary, but then I am still understanding VBA so I may have missed something here.

Does anyone have any ideas on a way to rid them completely (other than recreate the whole file)

Thanks in advance,
 

Excel Facts

Wildcard in VLOOKUP
Use =VLOOKUP("Apple*" to find apple, Apple, or applesauce
In case it's still up to date... Run with active main worksheet:
VBA Code:
Sub DelImages()
Dim p
    For Each p In ActiveSheet.Shapes
        If p.Type = msoPicture Then p.Delete
    Next p
End Sub
 
Upvote 0
Maybe it should be...
Code:
If p.Type = msoPicture Or p.Type = msoLinkedPicture Then p.Delete
HTH. Dave
 
Upvote 0

Forum statistics

Threads
1,223,910
Messages
6,175,318
Members
452,634
Latest member
cpostell

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top