Results 1 to 3 of 3

Thread: GoTo in VBScrpt

  1. #1
    New Lounger
    Join Date
    Jul 2003
    Posts
    19
    Thanks
    0
    Thanked 0 Times in 0 Posts

    GoTo in VBScrpt

    The following function throws an "Expected Statement" error on the goto line ???? Any ideas

    Function ClearNext(strExcept)
    Dim l 'As Long

    If Len(strExcept) > 0 Then
    If InNext(strExcept) Then
    While NextCodes(1) <> strExcept
    ShiftNext
    ShiftNextBeg
    Wend
    goto finally
    End If
    End If

    ReDim NextCodes(0)
    ReDim NextCodesBeg(0)

    finally:
    End Function

  2. #2
    Super Moderator jscher2000's Avatar
    Join Date
    Feb 2001
    Location
    Silicon Valley, USA
    Posts
    23,112
    Thanks
    5
    Thanked 93 Times in 89 Posts

    Re: GoTo in VBScrpt

    How about: VBScript doesn't support the GoTo statement. In this case you can substitute Exit Function.

  3. #3
    New Lounger
    Join Date
    Jul 2003
    Posts
    19
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: GoTo in VBScrpt

    Thank you, that hadn't occured to me.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •