Good afternoon,
I am creating a VBScript function to return an array. But I want to pass a parameter for the size of the array.
Function CreateArray(arraySize) Dim someArray(arraySize) ' EXPECTED INTEGER CONSTANT For i = 0 to UBound(someArray) someArray(i) = 5 Next CreateArray = someArray End Function
But I get an error message:
Expected Integer Constant
Can this be done in VBScript?
TIA
Coson
source share