View Single Post
  #2   Report Post  
Posted to microsoft.public.excel.programming
Nicke[_7_] Nicke[_7_] is offline
external usenet poster
 
Posts: 1
Default Inputting numbers only in Text Box


Hi,

Private Sub TextBox1_KeyPress(ByVal KeyAscii As MSForms.ReturnInteger)

If KeyAscii < 48 Or KeyAscii 57 Then
KeyAscii = 0
End If

End Sub

should do it..

--
Nick
-----------------------------------------------------------------------
Nicke's Profile: http://www.excelforum.com/member.php...nfo&userid=293
View this thread: http://www.excelforum.com/showthread.php?threadid=26952