Svgmassive
asked on
Count the number of used row in a closed workbook
I would like to count the number of used rows in an named range in a closed workbook.
thanks
thanks
SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Maybe it would be a good idea to tell us exactly what you want instead of drip-feeding us information. It would take a lot of guesswork out of the answers and save valuable time.
I agree with teylyn. Frankly, I don't understand your follow-up question at all; I see no correlation between ADO and this requirement. Are you trying to estimate the number of records to import from an external spreadsheet?
-Glenn
-Glenn
ASKER
yes glen ray..correct
Well, you don't need ADO to do it; just create the ROWS formula above and reference the data range in the workbook. It should work and run faster than opening an ADODB connection, executing a query, doing a MoveLast command and trying to estimate the record count from that.
In fact, some database systems don't recognize RecordCount; see this thread:
https://www.experts-exchange.com/questions/28495027/RecordCount-of-ADODB-RecordSet-returns-1-in-Excel-VBA.html
https://www.experts-exchange.com/questions/28495027/RecordCount-of-ADODB-RecordSet-returns-1-in-Excel-VBA.html
ASKER