Goto Statement

Syntax

GoTo label


label

Use: Required

Subroutine name.

Description

Passes execution to a subroutine within a procedure.

Rules at a Glance

label must be a subprocedure defined within the same procedure as Goto.

Programming Tips and Gotchas

  • The only time a modern VB program should include a Goto statement is in an error handler, as in:

    On Error Goto My_Sub_Err

  • For more information on error handling, see Chapter 6.

See Also

GoSub...Return Statement, Chapter 6
..................Content has been hidden....................

You can't read the all page of ebook, please click here login for view all page.
Reset
18.118.210.133