|
-
Feb 27th, 2001, 11:39 AM
#1
Thread Starter
Hyperactive Member
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
-
Feb 27th, 2001, 12:08 PM
#2
Lively Member
In Excel 2000 the max amount of rows is 65536
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|