I am retrieving values from execl sheet using the following code:
Dim objExcel as object
dim objWorkbook as object
Dim iRow,iCol as integer
Redim aValue (20) as string
for iRow= 2 to 10
The problem with this code is that if I keep a blank value in between, then it returns only blank after the blank value. Any idea why this is so?
I destroy my enemies when I make them my friends.
You should use "Redim preserve" for aValue .Actually only redim holds the previous value.
Inside the For loop ; iRow= iRow+1 is absurd.
Next iRow will increment iRow.This is incrementing the iRow twice and you are skipping the values; by capturing alternate row values.
oops [img]/images/graemlins/blush.gif[/img] .....u r right Litmus...I removed the iRow line and it is working fine...thanks [img]/images/graemlins/cool.gif[/img]