QLearnerNow
Programmer
Hi guys,
I have an array
ColWidths = split("141|51|40|50|60|61|61",DELIM)
when I pass this to a function
CreateReport(aManagedFunds, ColWidths, True))
and try to access the individual elements of ColWidths
Function CreateReport(aData, ColWidths, HasBorder)
Dim Rows, Cols, Row, Col, BorderString, TableString,i,j
Rows = UBound(aData,1)
Cols = UBound(aData,2)
'Response.Write "After" & ColWidths(5) & "<br>"
'Response.Write "Total no of Rows is :" & Rows & "<br>"
'Response.Write "Total no of Cols is :" & Cols & "<br>"
for j = 0 to Cols
Response.Write "the aData value is " & ColWidths(j) & "<br>"
next
'Response.End
It works perfectly if Reponse.End is uncommented and prints out the ColWidths(j) value but if it is commented then
i get this error
Subscript out of range: 'j'
at point j=5
I find this totally weird. if anyone can help I will be very grateful
Regards,
QLearnerNow
I have an array
ColWidths = split("141|51|40|50|60|61|61",DELIM)
when I pass this to a function
CreateReport(aManagedFunds, ColWidths, True))
and try to access the individual elements of ColWidths
Function CreateReport(aData, ColWidths, HasBorder)
Dim Rows, Cols, Row, Col, BorderString, TableString,i,j
Rows = UBound(aData,1)
Cols = UBound(aData,2)
'Response.Write "After" & ColWidths(5) & "<br>"
'Response.Write "Total no of Rows is :" & Rows & "<br>"
'Response.Write "Total no of Cols is :" & Cols & "<br>"
for j = 0 to Cols
Response.Write "the aData value is " & ColWidths(j) & "<br>"
next
'Response.End
It works perfectly if Reponse.End is uncommented and prints out the ColWidths(j) value but if it is commented then
i get this error
Subscript out of range: 'j'
at point j=5
I find this totally weird. if anyone can help I will be very grateful
Regards,
QLearnerNow