Hi all
I'm trying to build a 2 dimensional array from values in a spreadsheet.
I am used to using the
command to add values, but when I try this for a multi-dimentsional array I get an "out of range" error. Can anyone help?
I'm trying to build a 2 dimensional array from values in a spreadsheet.
I am used to using the
Code:
redmin preserve array(x)
Code:
n = 0
intColumn = 1
dim m
Dim arrCountries()
Do while not objExcel.Cells(intRow, intColumn) = ""
Redim preserve arrCountries(n,1)
arrCountries(n,0) = objExcel.Cells(intRow, intColumn)
arrCountries(n,1) = objExcel.Cells(intRow, intColumn + 1)
intRow = intRow + 1
n = n + 1
Loop