rrubio
14 years agoContributor
arrays and matrix definition and use in VBasic
I need to create a matrix containing different information. However I can't assign even a row to the array.
I am doing it in VBasic language.
Could anybody help me?
Thanks for all
PS: below, I append the code I am using
Dim resultsMatrix
Dim elementRow
For i = 0 to Nodes.length - 1
' Get the node from the collection of found nodes
Set Node = Nodes.item(i)
' Get child nodes
Set ChildNodes = Node.childNodes
' Output two child nodes to the log
Call Log.Message(ChildNodes.item(1).text + ": " + ChildNodes.item(2).text)
'insert a row
Set elementRow=elementRowAddItem(ChildNodes.item(1).text)
'insert a row
Set elementRow=elementRowAddItem(ChildNodes.item(2).text)
'insert a row
Set elementRow=elementRowAddItem(ChildNodes.item(3).text)
'insert a row
Set elementRow=elementRowAddItem(ChildNodes.item(4).text)
Set resultsMatrix= resultsMatrix.AddItemOfArrayType(elementRow)
Next
I am doing it in VBasic language.
Could anybody help me?
Thanks for all
PS: below, I append the code I am using
Dim resultsMatrix
Dim elementRow
For i = 0 to Nodes.length - 1
' Get the node from the collection of found nodes
Set Node = Nodes.item(i)
' Get child nodes
Set ChildNodes = Node.childNodes
' Output two child nodes to the log
Call Log.Message(ChildNodes.item(1).text + ": " + ChildNodes.item(2).text)
'insert a row
Set elementRow=elementRowAddItem(ChildNodes.item(1).text)
'insert a row
Set elementRow=elementRowAddItem(ChildNodes.item(2).text)
'insert a row
Set elementRow=elementRowAddItem(ChildNodes.item(3).text)
'insert a row
Set elementRow=elementRowAddItem(ChildNodes.item(4).text)
Set resultsMatrix= resultsMatrix.AddItemOfArrayType(elementRow)
Next