Posted By

lolrenx on 05/13/13


Tagged


Versions (?)

Who likes this?

1 person have marked this snippet as a favorite

Codebynite


Input Control


 / Published in: Visual Basic
 

force numeric input in control form

  1. Private Sub Control_KeyPress(ByVal KeyAscii As MSForms.ReturnInteger)
  2. 'force numbers inputs in txt_GPN
  3. If InStr("1234567890", Chr(KeyAscii)) = 0 Then
  4. KeyAscii = 0: Beep
  5. GoTo fastExit
  6. End If
  7. fastExit:
  8. End Sub

Report this snippet  

You need to login to post a comment.