I tried below line of code but still getting runtime error 1004, application defined or object defined .
lRow = oXLws.Range("A" & oXLws.Rows.Count).End(xlUp).Row

Originally Posted by
Aussiebear
@June7. The variable names are starting with o not 0. Derek_123 is simply following the programming concept of defining the variable name as o for object.
@Derek_123. Does this work to remove the error from the line in red?
lRow = oXLWs.Range("A" & .Rows.Count).End(xlUp).Row