excel

  • Thread starter Thread starter hari
  • Start date Start date
H

hari

In excel , through visual basic program how do i know row number / column
number of active cell
 
Sub demo()

MsgBox "Row " & ActiveCell.Row
MsgBox "Column " & ActiveCell.Column

End Sub
 
There is nothing mysterious or magical about the ActiveCell... it is a range
just like Range("B1") or Cells(1,2) are... and it has the same properties as
do all range objects which include Row and Column...

MsgBox "(Row, Col) = (" & ActiveCell.Row & ", " & ActiveCell.Column & ")"
 
Back
Top