VBcoders Guest



Don't have an account yet? Register
 


Forgot Password?



Two lines of codes, one forcing UPPER CASE in text box and one forcing to enter numeric only in tex

by dphan (1 Submission)
Category: Custom Controls/Forms/Menus
Compatability: VB 6.0
Difficulty: Unknown Difficulty
Originally Published: Thu 18th March 2004
Date Added: Mon 8th February 2021
Rating: (1 Votes)

Two lines of codes, one forcing UPPER CASE in text box and one forcing to enter numeric only in text box

Rate Two lines of codes, one forcing UPPER CASE in text box and one forcing to enter numeric only in tex



KeyAscii = IIf(KeyAscii >= vbKey0 And KeyAscii <= vbKey9 Or KeyAscii = vbKeyBack, KeyAscii, 0)
End Sub

Private Sub Text2_KeyPress(KeyAscii As Integer)
  ' 97 is lower case a and 122 is lower case z
  KeyAscii = IIf(KeyAscii >= 97 And KeyAscii <= 122, KeyAscii - 32, KeyAscii)
End Sub


Download this snippet    Add to My Saved Code

Two lines of codes, one forcing UPPER CASE in text box and one forcing to enter numeric only in tex Comments

No comments have been posted about Two lines of codes, one forcing UPPER CASE in text box and one forcing to enter numeric only in tex. Why not be the first to post a comment about Two lines of codes, one forcing UPPER CASE in text box and one forcing to enter numeric only in tex.

Post your comment

Subject:
Message:
0/1000 characters