I am trying to create a dictionary, with each key being a name I created, and each item an array of three objects: a string, an integer, and an array of what will be the results from a SOAP request.
I initialize the array like this:
Dim riskDict As New Scripting.Dictionary
riskDict.Add "Weight", Array("WP", 0, Array())
And I have a function, 'getTheRisk', which returns an X by 4 array (Its a SOAP request. I do not know how many results will come back, but it will be four values returned for each result.)
I would like to then store that result into the third element of the item in my dictionary, attempted like this:
For i = 0 To riskDict.count - 1
riskDict.Items(i)(2) = getTheRisk(myDate.Value, myPort.Value, riskDict.Items(i)(0))
Next i
This compiles and runs just fine, but after assigning the array, it shows up as empty in the dictionary:
The getTheRisk function returns something like the following:
How do I set the array in the dict to be the results of the SOAP request?