Showing posts with label VBA Excel Tips. Show all posts
Showing posts with label VBA Excel Tips. Show all posts

Tuesday, August 9, 2016

Finding Next Blank Row no in VBA

Sub test()
Dim myrng As Range
Set myrng = Range(ThisWorkbook.Sheets(1).Range("A1").Offset(0, 0), ThisWorkbook.Sheets(1).Range("A1").Offset(0, 0).End(xlDown))
MsgBox myrng.Rows.Count + 1
End Sub