relation between cell and picture which is above it.

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

Guest

in my sheet there is one column called 'picture', and many picture are in
cells belongs to this column.
my problem is that, i know picture is just floating on the sheet, it doesn't
belong to any cell. But, i need get the picture which is above certain cell.
so i need know the relation between one cell and picture which above this
cell.
in my sheet, the cell size is bigger than picture.so the picture is totally
in the cell.
 
Sub a()
Dim Pic As Shape
For Each Pic In ActiveSheet.Shapes
If Pic.TopLeftCell.Address(False, False) = "D9" Then
MsgBox Pic.Name
Exit For
End If
Next
End Sub

This assumes there are no other shapes in the same cell as the picture.
 
Back
Top