View Single Post
  #2   Report Post  
Posted to microsoft.public.excel.programming
grinning_crow[_4_] grinning_crow[_4_] is offline
external usenet poster
 
Posts: 1
Default putting validation to TextBox in the userform

I think this is along the right lines...

Private Sub textbox1_KeyPress(ByVal KeyAscii As _

MSForms.ReturnInteger)

If Not IsNumeric(Chr(KeyAscii)) Then
msgbox "Please only use numbers"
KeyAscii = 0
End If

End Sub

Hope it is of some use

--
Message posted from http://www.ExcelForum.com