View Full Version : Type Mismatch in For Loop in ASP


SteveClarkson
06-10-2006, 02:52 PM
HELP?!?

I am rather out of my depth in a little project I am tinkering with, and would SERIOUSLY appreciate any help you could offer!

I have attached (sorry, wouldn't let me attach it as ASP - have had to copy the code into a DOC) the page I am working on. The idea is that you can select multiple items from the list box, then they will appear in a list on the "gift certificate".

However, whenever I run it, I just get a "type mismatch" error.

Thank you very much indeed in anticipation! :)

Sergeant
06-10-2006, 05:25 PM
Look in your For loop...you forgot to put an '=' or Response.Write in front of the array...

<%
For I = LBound(arrSelectedItems) To UBound(arrSelectedItems)
%>
<%=arrSelectedItems(I) %><BR>
<%
Next
%>

SteveClarkson
06-11-2006, 07:05 AM
Thank you very much indeed!

That is entirely my fault - I remember seeing it, and deciding it didn't belong there, so merrily went and deleted it!

Thanks again.