current row - VBA

  • Thread starter Thread starter chrisdarl
  • Start date Start date
C

chrisdarl

Hi, i am wanting to find the row number of a active cell. can anyon
give me some code to be able to do this?
Many thanks Chris
 
Hi Chris

Use

Dim ActiveRow as Long
ActiveRow = Activecell.Row
msgbox ActiveRow


This gives the numeric value of the Row that the cell is on

HTH

Davi
 
What about this;

Sub RowNnumber()
Dim RowNumber As Long
RowNumber = ActiveCell.row
MsgBox ("Row number of the active cell is " & ActiveCell.row)
End Sub

Henk
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Back
Top