GoSub - Return


Public Sub Test() 
Dim myNumber As Integer

 myNumber = InputBox("Enter a positive number to be divided by 2.")

    If (myNumber > 0) Then
      GoSub LineLabel
   End If
 Debug.Print myNumber
 Exit Sub

LineLabel:
 myNumber = myNumber/2

 Return ' Return control to statement.
End Sub ' following the GoSub statement.


© 2019 Better Solutions Limited. All Rights Reserved. © 2019 Better Solutions Limited TopPrevNext