Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 2
Default How to get the number of Line/Column used in Excel sheet ?

Hi All,

I'm using a VbScript for Outlook , and want to get informations about Excel
file (Number of line and Column used)

Tks

--
Knowlege grows when shared.

http://bensoft.miniville.fr/tra


  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 10,593
Default How to get the number of Line/Column used in Excel sheet ?

Off the top

Dim XLApp As Object
Dim XLWB as Object
Dim NumRows As Long
Dim NumCols As Long

Set XLApp = CreateObject(Excel.Application")
Set XLWB = Workbooks.Open(Filename:="C:\test\filename.xls")

NumRows = XLWB.Worksheets(1).UsedRange.Rows.Count
NumCols = XLWB.Worksheets(1).UsedRange.Columns.Count

Set XLWB = Nothing
Set XLApp = Nothing

--
---
HTH

Bob


(there's no email, no snail mail, but somewhere should be gmail in my addy)



"bbnimda" wrote in message
...
Hi All,

I'm using a VbScript for Outlook , and want to get informations about
Excel file (Number of line and Column used)

Tks

--
Knowlege grows when shared.

http://bensoft.miniville.fr/tra



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
Compare sheet 1 column A numbers with sheet 2 column A number Not and Excel Expert Excel Worksheet Functions 3 November 20th 18 08:24 AM
Last number in a column shows in the total/summay line cell Jen S[_2_] Excel Worksheet Functions 3 March 25th 10 07:13 PM
MATCH A NUMBER IN A COLUMN WITH A COLUMN IN A DIFFERENT SHEET L Curly Excel Discussion (Misc queries) 1 July 7th 09 08:04 PM
change last serie to be line in the line-column Excel chart in Wor Eric Charts and Charting in Excel 3 June 30th 07 04:58 PM
Enabling Line/Column number in code Hari[_3_] Excel Programming 4 August 18th 04 04:03 PM


All times are GMT +1. The time now is 10:14 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"