use a form with one textbox, one label,one command button
Code:
Option Explicit

Private Sub Command1_Click()
Dim strTemp As Integer, strLen As String, x As Integer, strPhone As String
strPhone = Text1.Text
strLen = Len(strPhone)
For x = 1 To strLen
    strTemp = Asc(Mid$(strPhone, x, 1))
    If strTemp = 45 Then strTemp = 0
    If strTemp < 48 Or strTemp > 57 Then
    Label1.Caption = "You must only use numbers"
    Else
    Label1.Caption = "Thank you "
    End If
    
    Next

End Sub

Last edited by jwshepherd; 27Aug2007 at 05:08..