Hi Guys
I have written the following piece of code that will check if the phone number is numeric or not . But I want to add another check in this so that if there is a space in the phone number then just ignore it . As normally there is a space after postal code so my current code doesn't count a phone number numeric if there is a space.
Can anyone please make changes in the below code accordingly?
	
	
	
		
Thanks
 I have written the following piece of code that will check if the phone number is numeric or not . But I want to add another check in this so that if there is a space in the phone number then just ignore it . As normally there is a space after postal code so my current code doesn't count a phone number numeric if there is a space.
Can anyone please make changes in the below code accordingly?
		Code:
	
	
	Public Function NumbersOnly(ByVal strText As String) As Boolean
    Dim intCounter As Integer
    For intCounter = 1 To Len(strText)
        If Not IsNumeric(Mid(strText, intCounter, 1)) Then
            NumbersOnly = False
            Exit Function
        End If
    Next intCounter
    NumbersOnly = True
End Function
	Thanks