PDA

View Full Version : Solved: Phantom Pictures/Images



Opv
01-22-2012, 09:44 AM
I have a rather large worksheet that I have used for years to keep up with various financial information, tax worksheets, etc. All of a sudden recently I began to notice the outline of an empty image (roughly the size of a cell) as my mouse moved over certain cells. (This does not occur on all cells but, rather, on two or three contiguous cells at one or two locations within the worksheet.) I have embedded no pictures or shapes in my document; however, when I attempt to right click on one of those particular cells, rather than getting the normal context menu for a cell I get the context menu that includes the option to open the Picture menu. I have tried applying the "cut" option as the phantom picture outline appears, and it goes away as if it has been removed. However, when I hover over the cell again, the phantom empty picture outline appears again. Any thoughts or speculation as to what might be going on?

mdmackillop
01-22-2012, 05:24 PM
Have you tried counting/removing shapes on the sheet just to rule these out?

Opv
01-22-2012, 06:17 PM
Thanks. I'll give that a try.

Paul_Hossler
01-22-2012, 06:19 PM
Assuming the WB is not corrupted, you can try


Option Explicit
Sub DeletePicturesEtc()
Dim ws As Worksheet
Dim shp As Shape

For Each ws In ActiveWorkbook.Worksheets
For Each shp In ws.Shapes
shp.Delete
Next
Next
End Sub


Otherwise, it might be time to create a new, blank WB and copy / paste the data from the old one to the new one

Paul

Opv
01-22-2012, 06:24 PM
Assuming the WB is not corrupted, you can try


Option Explicit
Sub DeletePicturesEtc()
Dim ws As Worksheet
Dim shp As Shape

For Each ws In ActiveWorkbook.Worksheets
For Each shp In ws.Shapes
shp.Delete
Next
Next
End Sub

Otherwise, it might be time to create a new, blank WB and copy / paste the data from the old one to the new one

Paul

That seems to have done the trick, at least as far as I can tell. I'll keep my fingers crossed. Thanks!