Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
JP JP is offline
external usenet poster
 
Posts: 103
Default How to get the number of used rows from excel spreadsheet in VBScr

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
  #2   Report Post  
Posted to microsoft.public.excel.programming
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



  #3   Report Post  
Posted to microsoft.public.excel.programming
JP JP is offline
external usenet poster
 
Posts: 103
Default How to get the number of used rows from excel spreadsheet in V

Thanks for the help, but my problem really is not to get the used rows but
first to get an object reference to an already open excel spreadsheet. If I
run this line it will give me and error "Object required 'ActiveSheet'", so I
need to find out how to get an object reference to an already open excel
sheet. It would be gread if you could help me with that.
Thanks a bunch.
Judit

"Ron de Bruin" wrote:

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




Reply
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
sum the number of rows in a spreadsheet given 2 criteria??? Hank01061567 Excel Discussion (Misc queries) 3 November 13th 09 12:11 AM
How to number lines (rows) on both sides of spreadsheet crb.e4xplor Excel Worksheet Functions 6 April 7th 07 01:00 PM
What is the maximum number of rows in an Excel spreadsheet ? Larry Liu Excel Discussion (Misc queries) 5 September 20th 05 06:06 PM
How do I limit number of rows and columns on a spreadsheet Valser New Users to Excel 3 February 12th 05 10:31 PM
number of rows in spreadsheet seeker52 Excel Programming 1 February 22nd 04 05:02 PM


All times are GMT +1. The time now is 01:03 PM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
Copyright ©2004-2025 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"