-
Hi
How can I get a row count of what is in an excel sheet that I am using
heres my code:
spreadsheetname = PathToExcel & GS
On Error Resume Next
With objXLS
.Workbooks.Open spreadsheetname
Dim cell As Object
For lng = 2 To 10000
Cells(lng, 20).Select
For Each cell In Selection
cell.Value = "'" & cell.Value
Next
Next
ActiveWorkbook.Save
.Workbooks.Close
End With
Set objXLS = Nothing
I am looping to 10000 as I don't know how many rows are in the spreadsheet. How can I determine this so I can use it in my loop. ?
Cheers
-
In Excel 2000 the max amount of rows is 65536