Gosub

Branch to a subroutine in the same Sub or Function. The "Return" statement is used to return from the subroutine.

Syntax:  Gosub label

Example:

Sub test()

  ' do something
  Gosub test1

  ' do something else
  Gosub test1

  Exit Sub

test1: ' subroutine starts here

  ' subroutine code here

  Return ' subroutine ends here

End Sub

Also See: Goto, Return