M
Minitman
Greetings,
I am trying to display the last row in column A in a MsgBox with this
code on a CommandButton with this code:
______________________________________________
Private Sub CommandButton1_Click()
Dim lLastRow As Long
lLastRow = Sheets("CustList").Cells("65536", _
"A").End(xlUp).Rows.Offset(1, 0)
MsgBox "Last row plus 1 = " & lLastRow
End Sub
______________________________________________
The MsgBox says "Last Row plus 1 = 0"
There are 2913 rows in column A..
Can anyone see what is wrong with this code?
Any help will be appreciated.
-Minitman
I am trying to display the last row in column A in a MsgBox with this
code on a CommandButton with this code:
______________________________________________
Private Sub CommandButton1_Click()
Dim lLastRow As Long
lLastRow = Sheets("CustList").Cells("65536", _
"A").End(xlUp).Rows.Offset(1, 0)
MsgBox "Last row plus 1 = " & lLastRow
End Sub
______________________________________________
The MsgBox says "Last Row plus 1 = 0"
There are 2913 rows in column A..
Can anyone see what is wrong with this code?
Any help will be appreciated.
-Minitman