A sample statement written in the calling routine.
Variables set in the calling routine and passed to the Increase_Decrease function.
Variable names in the calling routine set to be the same as the Increase_Decrease function.
Sub Calculate() Dim Destination Dim Source Dim Factor Dim Scale Dim Inverse Destination = "A#Telephone" Source = "A#Telephone" Factor = "A#Factor.C1#[None]" Scale = "100" Inverse = False Call Increase_Decrease(Destination,Source,Factor,Scale, Inverse) End Sub ' Beginning of the Increase_Decrease function Sub Increase_Decrease(Destination,Source,Factor,Scale,Inverse) If Inverse = False Then HS.EXP Destination & " = " & Source & " * (1 + (" & Factor & " / " & Scale & "))" Else HS.EXP Destination & " = " & Source & " * (1 + ((" & Factor & " * -1) / " & Scale & ))" End If End Sub