Forum Discussion
venkat001
12 years agoOccasional Contributor
Thanks to all.
Got solution. when we declare dynamic array DIM arr() and try to asign the value before declaring the array dimension. we will get error message.
Ex. To read Excel data
Sub Temp
Dim arr()
''' Statements to be added '''''
x= Excel.Application.Activesheet.Usedrange.rows.count
y= Excel.Application.Activesheet.Usedrange.columns.count
ReDim arr(x)
For i=0 to x
Forj=0 to
arr(i,j)=Excel.cells(i+1,j+1)
Next
Next
End Sub
Regards,
Venkates K
Got solution. when we declare dynamic array DIM arr() and try to asign the value before declaring the array dimension. we will get error message.
Ex. To read Excel data
Sub Temp
Dim arr()
''' Statements to be added '''''
x= Excel.Application.Activesheet.Usedrange.rows.count
y= Excel.Application.Activesheet.Usedrange.columns.count
ReDim arr(x)
For i=0 to x
Forj=0 to
arr(i,j)=Excel.cells(i+1,j+1)
Next
Next
End Sub
Regards,
Venkates K