Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations gkittelson on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

for next statement 2

Status
Not open for further replies.

xenomage

Programmer
Jun 27, 2001
98
SG
this may sounds stupid but still need to ask...

i have this for...next statement in my program.

for i=1 to UBound(newItems)
response.write &quot;<p>&quot; & newItems(i) &quot;</p>&quot;
next

where newitems is an array.

when i load this page, the error page for IE is shown...anybody can tell me why??

thanks....
 
What does the error say?
Does it mention the array?? Mise Le Meas,

Mighty :)
 
As far as I can see you are missing an &.
Try:

for i=1 to UBound(newItems)
response.write &quot;<p>&quot; & newItems(i) & &quot;</p>&quot;
next

G -GTM Solutions, Home of USITE-
-=
 
Also note that arrays are base zero in VBscript, so you
probably want:
for i = lbound(newItems) to ubound(newItems)
or
for i = 0 to ubound(newItems)
.
.. Eat, think and be merry .
... ....................... .
 
haahaa.

stupid me. thanks guys.

regards
xeno.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top