by Ulysses R. Gotera (9 Submissions)
Category: Custom Controls/Forms/Menus
Compatability: Visual Basic 5.0
Difficulty: Unknown Difficulty
Originally Published: Fri 29th July 2005
Date Added: Mon 8th February 2021
Rating:
(1 Votes)
Changes all your keyed in letters into upper case.
API Declarations
' with out the user pressing the Caps Lock key?
'
' Then add the code below to your BAS file.
'
' Sample Usage:
'Private Sub Textbox1_KeyPress(KeyAscii As Integer)
' OnlyUpperCase KeyAscii
'End Sub
Optional Byval p_blnNoSpaces As Boolean)
' **************************************************
' Description : Changes lower case letters to upper case.
' The user does not need to press the Caps Lock key.
' An additional feature is that if you do not want any space
' in your textbox entries then just
' set the second parameter to true.
' Author : Ulysses R.Gotera
' e-mail : [email protected]
' Date Created : Friday, July 01, 2005
' **************************************************
If p_blnNoSpaces And (p_intKeyAscii = vbKeySpace) Then
p_intKeyAscii = 0
Exit Sub
End If
End If
If (p_intKeyAscii > 96) And (p_intKeyAscii < 123) Then
p_intKeyAscii = p_intKeyAscii - 32
End If
End Sub