Function Remain(Tmr As Integer) As Integer' stops a timer, Clears the flag and returns the remaining amount of time in the counter TMRini(Tmr)=TMRini(Tmr) And &h3FFFFFFFFFFFFFFF FlagRes(Tmr+TmrFgOffset) Remain=TMRctr(Tmr) End Function