Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
Bob Bob is offline
external usenet poster
 
Posts: 972
Default Determining row # of selected cell

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.
  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 11,501
Default Determining row # of selected cell

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

"Bob" wrote:

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.

  #3   Report Post  
Posted to microsoft.public.excel.programming
Bob Bob is offline
external usenet poster
 
Posts: 972
Default Determining row # of selected cell

Mike - Thanks!


"Mike H" wrote:

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

"Bob" wrote:

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.

Reply
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
I have a problem with determining if a shape is selected. AndyT Excel Programming 6 May 16th 07 06:37 PM
Determining Range of selected cell [email protected] Excel Programming 2 December 5th 06 06:49 AM
Determining if a chart is selected [email protected] Charts and Charting in Excel 2 January 25th 05 03:06 PM
Determining selected worksheet Bob Conar Excel Programming 3 October 20th 03 01:51 AM
Determining whether selected cell has value or formula? John Wirt Excel Programming 3 July 31st 03 04:19 AM


All times are GMT +1. The time now is 12:39 AM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"