Was this page helpful?
Your feedback about this content is important. Let us know what you think.
Additional feedback?
1500 characters remaining
3 Return without GoSub
Collapse the table of content
Expand the table of content

Visual Basic for Applications Reference

Visual Studio 6.0

Return without GoSub (Error 3)

See Also    Specifics

A Return statement must have a corresponding GoSub statement. This error has the following cause and solution:

  • You have a Return statement that can't be matched with a GoSub statement.

    Make sure your GoSub statement wasn't inadvertently deleted.

Unlike For...Next, While...Wend, and Sub...End Sub, which are matched at compile time, GoSub and Return are matched at run time.

For additional information, select the item in question and press F1.

Show:
© 2015 Microsoft