Find x-y coordinates of cell?

S

Sun Tzu

How can I find the x-y coordinates of the upper-left corner of a cell?

I want to insert two overlapping rectangles (msoShapeRectangle) of
different colors into the cell to illustrate the percentage value
displayed in an adjacent cell. Row heights an column widths on the
sheet are not predictable.

Thanks,
Wes
 
G

Gary''s Student

Sub whereAmI()
MsgBox (ActiveCell.Top & Chr(10) & ActiveCell.Left)
End Sub


Note that if you select A1 you get 0,0

So it is relative to the top of the shorksheet, not the top of the
application.
 
S

Sun Tzu

Sub whereAmI()
MsgBox (ActiveCell.Top & Chr(10) & ActiveCell.Left)
End Sub

Note that if you select A1 you get 0,0

So it is relative to the top of the shorksheet, not the top of the
application.
--
Gary''s Student - gsnu2007i







- Show quoted text -

Thank you!
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top