"Andrew Falanga" <af300wsm@xxxxxx> wrote in message
news:17cf1f2b-2394-44b6-a691-27c518813b43@xxxxxx
Quote:
> Hi,
>
> As you might have guessed, both from this post and the one I made
> yesterday, I'm a VBScript neophyte. I'm looking on MSDN but, as yet,
> cannot find a construct such as 'continue' for loops. I'm assuming
> that many in this forum are familiar with languages like C or Java and
> will recognize this keyword.
>
> I need a way to start at the top of a For Each loop if a specific
> condition is met, but can't seem to find Continue. I shall keep
> looking while awaiting replies.
>
> Thanks for any help,
> Andy
Another approach would be to use a nested Do...Loop Until True
For Each obj_TargetSubFolder in col_TargetSubFolders
Do
' some stuff goes here
If (Mid(obj_TargetSubFolder.Name,1,1) = "$") Then Exit Do: ' Equates to a
continue for the For
' more stuff goes here
Wscript.Echo obj_TargetSubFolder.Name
Loop Until True: ' So the Do..Loop
Next
--
Steve