Elton,
Thank you for answering my question. I tried the AxCWArray ActiveX control, and it works. In my original code generating the error message, I used the control class: CWArray, and sorry for the confusion. Here is the code:
sub test()
dim CWArray1 as CWInstrumentControlLib.CWArray
CWArray1 = new CWInstrumentControlLib.CWArray
Dim a(4, 5) As Double
Dim j, k As Integer
Dim l As Integer = 0
For j = 0 To 4
For k = 0 To 5
a(j, k) = l
l += 1
Next
Next
Dim result() As Double
result = CWArray1.IndexArray(a, New Object() {2, DBNull.Value})
result = CWArray1.IndexArray(a, New Object() {DBNull.Value, 1})
end sub
Rong Zhu