if thisform.text1.value <9999 or thisform.text1.value>99999999 &&9999 mean 3654 erroe message thisform.text1.setfocus endif