Private Sub PassArray()
Dim myArray() 'Declare a Static Integer Array of 4 elements
Dim arrayIndex
arrayIndex = 0
ReDim Preserve myArray(arrayIndex)
myArray(0) = "one"
arrayIndex=arrayIndex+1
ReDim Preserve myArray(arrayIndex)
myArray(1) = "two"
arrayIndex=arrayIndex+1
ReDim Preserve myArray(arrayIndex)
myArray(2) = "three"
arrayIndex=arrayIndex+1
ReDim Preserve myArray(arrayIndex)
myArray(3) = "four"
Call AcceptArray(myArray) 'Call the procedure and pass the Array
End Sub
Private Sub AcceptArray(outArray())
dim iCount
For iCount=0 to ubound(outArray)
WScript.echo outArray(iCount)
Next
End Sub
Subscribe to:
Post Comments (Atom)
No comments:
Post a Comment