View Single Post
  #2   Report Post  
Posted to microsoft.public.excel.programming
Ron de Bruin Ron de Bruin is offline
external usenet poster
 
Posts: 11,123
Default How to get the number of used rows from excel spreadsheet in VBScr

Hi JP

You can use
MsgBox ActiveSheet.UsedRange.Rows.Count

Remember this is not always give you the last row with data.
The usedrange not always start in row 1



--
Regards Ron de Bruin
http://www.rondebruin.nl



"JP" wrote in message ...
I need a piece of script, that connects to an ALREADY OPEN excel spreadsheet
and get the number of used rows, using VBScript. So far I was unable to do it
and I found solutions only in VB or other languages. Please help if you know
how to.
Thanks,
Judit