how to get the value object back from 'customproperties'?
You'd need to loop all your shapes until you find one whose TopLeftCell
address is the same as the ActiveCell. Also depends what you mean by "on"
the cell, the TopLeftCell might be above and/or to the left of the
ActiveCell and the shape may well be regarded as "on" it.
Alternatively, to get a shape that whole or partially is over the
activecell -
Sub test()
Dim sh As Shape, r As Range
For Each sh In ActiveSheet.Shapes
With sh
Set r = Range(.TopLeftCell, .BottomRightCell)
End With
If Not Intersect(ActiveCell, r) Is Nothing Then Exit For
Next
If Not sh Is Nothing Then
MsgBox sh.Name
Else
MsgBox "no shape is over the activecell"
End If
End Sub
Regards,
Peter T
"NA_AB" wrote in message
...
hey, many thanks for the help guys :)
I have another question... how can we get the shape residing on the active
cell?
if suppose i have a shape on my active cell. Is there a way, I can say
some
thing like
Shape s = active_cell.shape; or somethin like dat...
Regards.
|