Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
Home
DiscussionsAccessExcelInfoPathOutlookPowerPointPublisherWord
DirectoryUser Groups
Related Topics
Outlook ExpressInternet ExplorerWindowsMS Server ProductsMore Topics ...

MS Office Forum / Excel / Programming / September 2007

Tip: Looking for answers? Try searching our database.

Determining row # of selected cell

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
Bob - 25 Sep 2007 12:08 GMT
I need to determine and then store the row number of the cell that has been
selected in the active workbook.  Later, after running some additional code,
I need to select the cell in column A using the row number that was stored in
the first step.

Can someone kindly show me how to do this?  Thanks in advance for the help.
Mike H - 25 Sep 2007 12:26 GMT
Bob,

Try this

Sub getrow()
myAddress = ActiveCell.Row

'write row number to A1 (Change to suit)
Sheets("Sheet1").Cells(1, 1).Value = myAddress
'run some other code

'Get row number from A1 on sheet 1
Cells(Sheets("Sheet1").Cells(1, 1).Value, 1).Select
End Sub

Mike

> I need to determine and then store the row number of the cell that has been
> selected in the active workbook.  Later, after running some additional code,
> I need to select the cell in column A using the row number that was stored in
> the first step.
>
> Can someone kindly show me how to do this?  Thanks in advance for the help.
Bob - 25 Sep 2007 12:28 GMT
Mike - Thanks!

> Bob,
>
[quoted text clipped - 19 lines]
> >
> > Can someone kindly show me how to do this?  Thanks in advance for the help.
 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2008 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.