The following Code use the method INSTR to control and allow numeric input only.
Sub TextBox1_Change
If Instr("1234567890",Right(Textbox1.Text,1))=0 Then
TextBox1.Text = Left(TextBox1.Text,Len(TextBox1.Text)-1)
TextBox1.selstart=Len(TextBox1.Text)
End If
End Sub
There is another way to check if the input string is numeric only and to prompt user accordingly
if UCase(Text1.text)=LCase(Text1.text) then '---[go over to execute code]--- else msgbox "Numeric input only allowed" End if