Last Row in Column not working
Just a guess...
Perhaps Tools - Options - General tab; is the R1C1 reference style checked?
In R1C1 reference style, both rows and columns are numbered numerically.
"Terry" wrote:
OK, I am stuck. I have this line of code that was working:
Doesn't work
lnglastrow = xlSheet.Cells(xlSheet.Rows.Count, "A").End(xlUp).Row
Does work
lnglastrow = xlSheet.Cells(xlSheet.Rows.Count, 1).End(xlUp).Row
Now it only works if I replace the "A" with a 1. This is happening
throughout my code where I do not use a column number. Anyone have any
suggestions?
thanks
Terry
|