How do I find out which cell I've selected?
I have a VBA routine that selects a (one-cell) named range, which will
likely move around due to row/column insertions and deletions.
How can I get VBA to know what actual cell it's in?
How do I find out which cell I've selected?
I have a VBA routine that selects a (one-cell) named range, which will
likely move around due to row/column insertions and deletions.
How can I get VBA to know what actual cell it's in?
Activecell is the active cell of a selection, so if the selection is one
cell, it is also the selection.
You can work with that
Msgbox Activecell.Value
or get properties of it
Msgbox Activecell.Address
--
HTH
Bob Phillips
(remove nothere from email address if mailing direct)
"GoBobbyGo" <[email protected]> wrote in message
news:[email protected]...
> How do I find out which cell I've selected?
>
> I have a VBA routine that selects a (one-cell) named range, which will
> likely move around due to row/column insertions and deletions.
>
> How can I get VBA to know what actual cell it's in?
Any easy way to get the X and Y coords of the cell?
Martin Short
You can get it relative to the spreadsheet with Activecell.Left and .Top.
--
HTH
Bob Phillips
(remove nothere from email address if mailing direct)
"MartinShort" <[email protected]>
wrote in message
news:[email protected]...
>
> Any easy way to get the X and Y coords of the cell?
>
>
> --
> MartinShort
>
> Software Tester
> ------------------------------------------------------------------------
> MartinShort's Profile:
http://www.excelforum.com/member.php...o&userid=22034
> View this thread: http://www.excelforum.com/showthread...hreadid=494191
>
Cheers Bob
There are currently 1 users browsing this thread. (0 members and 1 guests)
Bookmarks