Quantcast
Channel: The Official Scripting Guys Forum! forum
Viewing all articles
Browse latest Browse all 15028

Question about VBScript "Continue For"

$
0
0

Hello

Can someone please help me with the following question please.

I have a VBScript Like this

for each item in collection

 if item > 2 then

    wscript.echo item

 end if

 if item > 5 then

    wscript.echo item

 end if

Next

now what I want to do is if the first condition is met (if item > 2) I want to process the statement, but then do to the next item in the for each loop e.g. continue and not test the second condition (if item > 5)

I looked on the WEB and it appears I should be using the "Continue For" or "Then Continue For" but I cannot get the syntax right.

Can some one please explain how to do this, thank you

AAnotherUser__


AAnotherUser__


Viewing all articles
Browse latest Browse all 15028

Trending Articles