Is there a property that I can use to set the Textbox to show capital alphabet even if I type using lower case ?
Printable View
Is there a property that I can use to set the Textbox to show capital alphabet even if I type using lower case ?
Try this code
Hope this helpsCode:Private Sub Text1_KeyPress(KeyAscii As Integer)
If KeyAscii < "97" Or KeyAscii > "122" Then
KeyAscii = KeyAscii
Else
KeyAscii = KeyAscii - 32
End If
End Sub
Code:Private Sub Text1_Change()
Dim lng_Pos As Long
lng_Pos = Text1.SelStart
Text1.Text = UCase(Text1.Text)
Text1.SelStart = lng_Pos
End Sub
Code:Proper Case:
Text1.text = StrConv(Text1, vbProperCase)
Lcase:
Text1.text = StrConv(Text1, vbLowerCase)
Ucase:
Text1.text = StrConv(Text1, vbUpperCase)