Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 2
Default Read EXCEL table

Hello! I've a problem.
I have an excel sheet thath contains a table made of 16 columns and not
specified number of rows ( for example 10-100-1000 etc.).
My problem is: I want to read this table, using VBA. Now I read each cell,
and when I read an empty value, I assume that there aren't any values to
read.
My question is: Can I read this table in one time ( I've defined the RANGE
object that contains column A:R)?

Thank you for response.
By.


  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 27,285
Default Read EXCEL table

Dim vArr as Variant
Dim rng as Range
set rng = Range("A1").CurrentRegion
set rng = rng.resize(,16)
msgbox rng.address
vArr = rng.Value

for i = 1 to ubound(vArr)
for j = 1 to 16
'use varr(i,j)
Next
Next

--
Regards,
Tom Ogilvy


"Roberto Cortiana" wrote in message
...
Hello! I've a problem.
I have an excel sheet thath contains a table made of 16 columns and not
specified number of rows ( for example 10-100-1000 etc.).
My problem is: I want to read this table, using VBA. Now I read each cell,
and when I read an empty value, I assume that there aren't any values to
read.
My question is: Can I read this table in one time ( I've defined the RANGE
object that contains column A:R)?

Thank you for response.
By.




  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 2
Default Read EXCEL table

Thank-you very much!!!!!!!!!!!!!!

IT WORKS CORRECTLY.

"Tom Ogilvy" ha scritto nel messaggio
...
Dim vArr as Variant
Dim rng as Range
set rng = Range("A1").CurrentRegion
set rng = rng.resize(,16)
msgbox rng.address
vArr = rng.Value

for i = 1 to ubound(vArr)
for j = 1 to 16
'use varr(i,j)
Next
Next

--
Regards,
Tom Ogilvy


"Roberto Cortiana" wrote in message
...
Hello! I've a problem.
I have an excel sheet thath contains a table made of 16 columns and not
specified number of rows ( for example 10-100-1000 etc.).
My problem is: I want to read this table, using VBA. Now I read each

cell,
and when I read an empty value, I assume that there aren't any values to
read.
My question is: Can I read this table in one time ( I've defined the

RANGE
object that contains column A:R)?

Thank you for response.
By.






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
Connection of Excel 07 pivot table to Access Query makes DB read o Chuck W[_2_] Excel Discussion (Misc queries) 0 October 9th 09 03:45 PM
Excel-read a table DHS64 Excel Worksheet Functions 1 September 26th 05 09:37 PM
Sumproduct in Excel Spreadsheet to read Access db table Jules Excel Worksheet Functions 1 November 9th 04 02:50 PM
How to read from a SQL Server table into Excel and use the Excel cell format as in the database Belinda Excel Programming 1 June 10th 04 04:45 PM
How to read a SQL Table into Excel change the data and write back into SQL Belinda Excel Programming 1 June 10th 04 10:18 AM


All times are GMT +1. The time now is 05:20 PM.

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

About Us

"It's about Microsoft Excel"