Home |
Search |
Today's Posts |
|
#1
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
I have several shapes on a spreadsheet that I want to assign a common macro,
but within the macro I need to know the shape location. I need to know how to find XXX (the shape name or index) to get it to a location Sub box_select() Set Sx = ActiveSheet Lx = Sx.Shapes(XXX).TopLeftCell.Address Range(Lx).Select End Sub Thanks. Tom |
#2
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
You have a macro that's assigned to the shape and you want to know what shape
was clicked? Lx = Sx.Shapes(application.caller).TopLeftCell.Address Tom wrote: I have several shapes on a spreadsheet that I want to assign a common macro, but within the macro I need to know the shape location. I need to know how to find XXX (the shape name or index) to get it to a location Sub box_select() Set Sx = ActiveSheet Lx = Sx.Shapes(XXX).TopLeftCell.Address Range(Lx).Select End Sub Thanks. Tom -- Dave Peterson |
#3
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
Hi Tom,
Dim XXX as string XXX = Application.Caller Also have a look at Application.Goto(ref, true/false) Regards, Peter "Tom" wrote in message ... I have several shapes on a spreadsheet that I want to assign a common macro, but within the macro I need to know the shape location. I need to know how to find XXX (the shape name or index) to get it to a location Sub box_select() Set Sx = ActiveSheet Lx = Sx.Shapes(XXX).TopLeftCell.Address Range(Lx).Select End Sub Thanks. Tom |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
Copy Selection - Transpose Selection - Delete Selection | Excel Discussion (Misc queries) | |||
my curser changed from arrow shape to a cross shape???? | New Users to Excel | |||
Shape Selection Event !! | Excel Programming | |||
Deleting a shape and the cell contents the shape is in. | Excel Programming | |||
Deleting a shape and the cell contents the shape is in. | Excel Programming |