Consulting

Results 1 to 3 of 3

Thread: Active Row Index?

  1. #1

    Active Row Index?

    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
    [VBA]
    Sub test()
    Range("A:A").End(xlDown).Select
    End Sub
    [/VBA]
    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.

  2. #2
    Distinguished Lord of VBAX VBAX Grand Master Bob Phillips's Avatar
    Joined
    Apr 2005
    Posts
    25,453
    Location
    [vba]

    myRow= Range("A1").End(xlDown).Row
    [/vba]
    ____________________________________________
    Nihil simul inventum est et perfectum

    Abusus non tollit usum

    Last night I dreamed of a small consolation enjoyed only by the blind: Nobody knows the trouble I've not seen!
    James Thurber

  3. #3
    Thanks!

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •