![]() |
refering to worksheet cell under shaoe object
TIA for your time
Is there a way to ask a shape object which worksheet cell it is positioned over? -- David |
refering to worksheet cell under shaoe object
Hi David
With ActiveSheet.Shapes(1) MsgBox .TopLeftCell.Address, , .Name End With Regards, Peter T "David" wrote in message ... TIA for your time Is there a way to ask a shape object which worksheet cell it is positioned over? -- David |
refering to worksheet cell under shaoe object
Thanks for your response Peter
-- David "Peter T" wrote: Hi David With ActiveSheet.Shapes(1) MsgBox .TopLeftCell.Address, , .Name End With Regards, Peter T "David" wrote in message ... TIA for your time Is there a way to ask a shape object which worksheet cell it is positioned over? -- David |
refering to worksheet cell under shaoe object
Peter
Thanks again for your response Along the same lines, when I return the X & Y co-ords from a mouse down event, can i refer to the worksheet cell (where the mouse was clicked) using the X & Y values? -- David "Peter T" wrote: Hi David With ActiveSheet.Shapes(1) MsgBox .TopLeftCell.Address, , .Name End With Regards, Peter T "David" wrote in message ... TIA for your time Is there a way to ask a shape object which worksheet cell it is positioned over? -- David |
refering to worksheet cell under shaoe object
David - What object's mouse down event that returns X & Y co-ords are you
referring to. There isn't one for cells or for shapes other than ActiveX controls. With cells there is the selection change event from which you can calculate left & top offsets of the active cell from A1. But that's not the same as X & Y screen co-ords, if that's what you are trying to get. Regards, Peter T "David" wrote in message ... Peter Thanks again for your response Along the same lines, when I return the X & Y co-ords from a mouse down event, can i refer to the worksheet cell (where the mouse was clicked) using the X & Y values? -- David "Peter T" wrote: Hi David With ActiveSheet.Shapes(1) MsgBox .TopLeftCell.Address, , .Name End With Regards, Peter T "David" wrote in message ... TIA for your time Is there a way to ask a shape object which worksheet cell it is positioned over? -- David |
refering to worksheet cell under shaoe object
Sorry Peter,
I'm refering to a MouseDown event on an activeX image control. I have several of these controls on the worksheet and would like to return a reference to the cell underneath the control that was clicked -- David "Peter T" wrote: David - What object's mouse down event that returns X & Y co-ords are you referring to. There isn't one for cells or for shapes other than ActiveX controls. With cells there is the selection change event from which you can calculate left & top offsets of the active cell from A1. But that's not the same as X & Y screen co-ords, if that's what you are trying to get. Regards, Peter T "David" wrote in message ... Peter Thanks again for your response Along the same lines, when I return the X & Y co-ords from a mouse down event, can i refer to the worksheet cell (where the mouse was clicked) using the X & Y values? -- David "Peter T" wrote: Hi David With ActiveSheet.Shapes(1) MsgBox .TopLeftCell.Address, , .Name End With Regards, Peter T "David" wrote in message ... TIA for your time Is there a way to ask a shape object which worksheet cell it is positioned over? -- David |
refering to worksheet cell under shaoe object
An Image control will have a click event. Obviously, since you write the
code for the click event, you already know which control it belongs to. You can then use that information to get the topleftcell. Private Sub Image1_Click() MsgBox Image1.TopLeftCell.Address End Sub -- Regards, Tom Ogilvy "David" wrote in message ... Sorry Peter, I'm refering to a MouseDown event on an activeX image control. I have several of these controls on the worksheet and would like to return a reference to the cell underneath the control that was clicked -- David "Peter T" wrote: David - What object's mouse down event that returns X & Y co-ords are you referring to. There isn't one for cells or for shapes other than ActiveX controls. With cells there is the selection change event from which you can calculate left & top offsets of the active cell from A1. But that's not the same as X & Y screen co-ords, if that's what you are trying to get. Regards, Peter T "David" wrote in message ... Peter Thanks again for your response Along the same lines, when I return the X & Y co-ords from a mouse down event, can i refer to the worksheet cell (where the mouse was clicked) using the X & Y values? -- David "Peter T" wrote: Hi David With ActiveSheet.Shapes(1) MsgBox .TopLeftCell.Address, , .Name End With Regards, Peter T "David" wrote in message ... TIA for your time Is there a way to ask a shape object which worksheet cell it is positioned over? -- David |
All times are GMT +1. The time now is 12:33 PM. |
Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
ExcelBanter.com