Sub mainDim Msg ' Declare variable.Msg = "This GCode is for making Gears with the A Axis. "Msg = Msg & "Only use Positive numbers when requested."MsgBox Msg, 64, "Macro Parameters"Dim Gear1 As DoubleDim AxisCut As StringTeeth = Question ("How Many Teeth on the Gear?")Gear1=Val(Teeth)SetVar(6,Gear1)Gear1 = 360/Gear1Print Gear1SetVar(1, Gear1)Message "Angle Between Teeth " & Gear1GearWidth = Question ("How wide is the tooth?")SetVar(2,Val(GearWidth)) AxisCut=InputBox ("What Axis are you cutting with - X or Y?","Axis Choice", "X", 200, 200)If AxisCut = "X" Then SetVar(3,1234) Else SetVar(3,1235)End IfPrint AxisCutDepthCut= Question ("What is the total tooth Depth?")SetVar(4,Val(DepthCut-(2*DepthCut)))CutPass=Question("What is the Maximum Cut Depth per Pass?")SetVar(8,Val(CutPass))Loops = Val(DepthCut)/Val(CutPass)Print LoopsMainLoops= Val(Fix(Loops))LastCut=(Loops - MainLoops) * Val(CutPass)Print LastCutSetVar(7,LastCut)SetVar(5,MainLoops)Print MainLoopsTest=Val(DepthCut-(2*DepthCut))Print TestEnd Sub  