PDA

View Full Version : Active Row Index?



next
02-19-2008, 11:29 AM
I'm a total nOob to VBA and i couldn't find an answer to this question in the Help file. How do i find out the row number of actve cell without running a loop command?
example: Column A contains a value in row# 5, i use this to activate it

Sub test()
Range("A:A").End(xlDown).Select
End Sub

How do i store the row number in a variable? For example in this case var x would be 5.

Thanks for all the help.

Bob Phillips
02-19-2008, 01:48 PM
myRow= Range("A1").End(xlDown).Row

next
02-19-2008, 01:53 PM
Thanks!