Function CheckMousePos(byVal x As Integer, byVal y As Integer, _ byVal Xmin As Integer, byVal Xmax As Integer, _ byVal Ymin As Integer, byVal Ymax As Integer) As Integer 'This is only a function, to be included in your program 'with help from alphonsospringer, MisterD Return Not (xXmax Or yYmax) End Function