I have written a simple code to illustrate my predicament.
Sub test() Dim sh As Worksheet Set sh = ThisWorkbook.Sheets(\"Sheet1\") Dim k As Lon
Have you tried :-
Sub test() k = Cells(Rows.Count, "A").End(xlUp).Row MsgBox (k) End Sub
The /only/ catch is that if there is no data it still returns 1.