Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.excel.programming
|
|||
|
|||
On Action
Hi,
I have drawn a rectangle and assigned a macro to it. When I click on this rectangle, I would like the macro to display the position of the rectangle. My macro looks something like this: sub macro1 msgbox selection.top end sub I am guessing this doesn't work because the rectangle is not selected when the macro is running? If you can help, it is greatly appreciated. Thanks! |
#2
Posted to microsoft.public.excel.programming
|
|||
|
|||
On Action
Thank you soooooo much!!!
"Greg Wilson" wrote: Try: Sub test() With ActiveSheet.Shapes(Application.Caller) MsgBox "Top = " & .Top & vbCr & "Left = " & .Left End With End Sub Regards, Greg "borg" wrote: Hi, I have drawn a rectangle and assigned a macro to it. When I click on this rectangle, I would like the macro to display the position of the rectangle. My macro looks something like this: sub macro1 msgbox selection.top end sub I am guessing this doesn't work because the rectangle is not selected when the macro is running? If you can help, it is greatly appreciated. Thanks! |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
Excell copy action pauses for 15 second for the smallest action | Excel Discussion (Misc queries) | |||
Allow no action to be taken | Excel Worksheet Functions | |||
what is an OLE action | Excel Programming | |||
an OLE Action | Excel Programming | |||
if ... then action | Excel Programming |