With the following code ...
************
Dim ValueArray
ValueArray = MyFunctionToGenerateArray ()
for i = 0 to Ubound(ValueArray) <-------- error pointing here.
Response.Write(ValueArray(i) + "<br/>")
next
...
function MyFunctionToGenerateArray ()
MyFunctionToGenerateArray = Array(1,2,3,4,5,6,7,8,9)
end function
************
I get the following error ...
Microsoft VBScript runtime error '800a000d'
Type mismatch: 'Ubound'
/SAW/PostListener.asp, line 88
********************************************************************
If I change the code to this ...
************
Dim ValueArray()
Redim ValueArray(10)
ValueArray = MyFunctionToGenerateArray () <-------- error pointing
here.
for i = 0 to Ubound(ValueArray)
Response.Write(ValueArray(i) + "<br/>")
next
************
I get the following ...
Microsoft VBScript runtime error '800a000d'
Type mismatch
I know this should be simple, but I just cant figure it out.
Dim ValueArray
Dim i
ValueArray = MyFunctionToGenerateArray ()
for i = 0 to Ubound(ValueArray)
Response.Write(ValueArray(i) & "<br/>")
next