lowerlimit<=n<=UpperLimit
Function Constrain(v As Integer,Llim As Integer, Ulim As Integer) As Integer Constrain=Min(Max(v,Llim ),Ulim ) End Function