Declaring Global Variables

The subroutines of the Gardenpath macro utilize several global variables. A global variable can be used to exchange a value between functions or store a value while the project is loaded in memory.

The following steps explain how to define the global variables that will be used by the Gardenpath macro:

  1. In the Code window, click after the Const pi = 3.14159 statement and press Enter twice.
  2. Type the following code:
    Private sp(0 To 2) As Double
    Private ep(0 To 2) As Double
    Private hwidth As Double
    Private trad As Double
    Private tspac As Double
    Private pangle As Double
    Private plength As Double
    Private totalwidth As Double
    Private angp90 As Double
    Private angm90 As Double
  3. Save the project.