kelly mort
Well-known Member
- Joined
- Apr 10, 2017
- Messages
- 2,169
- Office Version
- 2016
- Platform
- Windows
I have used this code to discard all characters except numbers. Now I want to allow the input of points too but I can't make it happen. Can someone fix it for me?
Code:
Private Sub TextBox1_KeyPress (ByVal KeyAscii As MSForms.ReturnInteger)
KeyAscii = KeyAscii * -CLng(Chr(KeyAscii) Like "[0-9]")
End Sub