Skipping to a specific line of code

  • Re: Skipping to a specific line of code


    Yes there is, but it's not considered good practice. You can label lines as follows:

    Code
    1. Sub Zero()
    2. Dim UserResponse As Long
    3. 10: UserResponse = MsgBox("Would you like to loop?", vbYesNo + vbQuestion)
    4. If UserResponse = vbYes Then GoTo 10
    5. End Sub