Sub Main()'if(if there is any thing that you would like to stop the macro put it here) Then'Call SetOEMDRO(1100,0)'Exit Sub'end ifCodeSpeed = GetUserDro(1112)                               'Speed asked For by codeTrueSpeed = GetOemDro(SpindleSpeed)                        'Speed of spindleCount  = GetUserDro(1100)                                  'Get the countIf(Count < 4) Then   Call SetVar(70+Count,TrueSpeed)  Count = Count +1  Call SetOEMDRO(1100,Count)    Else  Call SetOEMDRO(1100,0)  Call SetOemDro(1113,GetVar(70))      Call SetOemDro(1114,GetVar(71))  Call SetOemDro(1115,GetVar(72))  Call SetOemDro(1116,GetVar(73))  Avg = (GetVar(70)+GetVar(71)+GetVar(72)+GetVar(73))/4      'Avg speed  Low = CodeSpeed*.9                                         'Lowest speed that is safe  Call SetOemDro(1117,Avg)  Call SetOemDro(1118,Low)    If Avg < Low Then                                             'If  More then 10% less  Call DoOemButton(1003)                                      'Call Stop Button  MsgBox("SpindleFault")                                      'Spindle Fault message  Call SetOemDro(1113,0)                                      'Set DRO back To 0  Call SetOemDro(1114,0)  Call SetOemDro(1115,0)Else  Call SetOemDro(1113,0)  Call SetOemDro(1114,0)  Call SetOemDro(1115,0)End IfEnd IfEnd Submain  