hi,
as an option
see if it helps you
Sub Button2_Click()
'http://www.rondebruin.nl/last.htm
'Find the last used row in a Column: column A in this example
    Dim LastRow As Long
    With ActiveSheet
        LastRow = .Cells(.Rows.Count, "A").End(xlUp).Row
        
    End With
    MsgBox "Row" & LastRow

End Sub