Read EXCEL table

  • Thread starter Thread starter Roberto Cortiana
  • Start date Start date
R

Roberto Cortiana

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.
 
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
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Back
Top