Creating a New Subroutine  

The Generator places all generated statements in a subroutine. You can specify a new subroutine whenever desired. When you do, the Generator closes the current subroutine and starts a new one. Variables needed in every subroutine are also added:

End Sub

Sub NewRoutine()
Dim iCtrl As Integer ' Control index variable
Dim bOK As Boolean ' Return code variable

All session actions after this point are placed in the new subroutine. All actions performed before you have defined a subroutine go in a default subroutine started at the beginning of your session.

Use the Controls window to specify the new subroutine:

  1. Select Subroutine in the Name Type field.
  2. In the Name field, modify the suggested subroutine name, if desired.
  3. Choose Add Name.