I define a function in a microfiles named M15 ,
and I use TxM15 to change my tool,also I define a funtion in changing tool:
    MyZ = GetOemDro(802)
   If MyZ >55 Then
   code "g01 f1500"
   code "g53 z"&toolup
    msgbox " fail to release tool, press any key to continue"
   End If
but I find when I load a new nc file , the screen display all the lines,when to TxM15, then messagebox displayed and stop 
please tell me why and how to avoid the error thank you