View Single Post
  #4   Report Post  
Posted to microsoft.public.excel.programming
Norman Jones Norman Jones is offline
external usenet poster
 
Posts: 5,302
Default Get Name of Macro Initiator - Value of underlaying cell?

Hi Space Camel,

Try something like:


'=============
Public Sub Tester()
Dim Rng As Range
Dim SHP As Shape

Set SHP = ActiveSheet.Shapes(Application.Caller)

Set Rng = SHP.TopLeftCell
MsgBox Rng.Address(0, 0, External:=True)

End Sub
'<<=============


---
Regards,
Norman


"SpaceCamel" wrote in message
...
Just what I was looking For.

Thanks guys.
'--------------------------

One more thing...

I now need to get the value of the cell that the shape is over.
-----
The shapes were added with this code to put them over the correct cell.
With thiscell
With .Parent.Shapes.AddShape( _
Type:=msoShapeRoundedRectangle, _
Left:=.Left + 2, _
Top:=.Top, _

======================================