hi my friends , this is my function to to check space it is my function code : Function check_space(str) As Boolean Dim i As Integer Dim asci_code As Integer For i = 1 To Len(str) asci_code = Asc(Mid(str, i, 1)) If asci_code = 32 Then remove_space = True Else remove_space =False End If Next End Function now i want use my function check_space , in datavalidation custom box by typing this formula : check_space(a1) it cant work... plz help