in userform1 in textbox1 contain code for user enter only 10 digit number. but problem is when userform close then message box show textbox1 enter only 10 digit no what is incorrect in this code i attache the sample file