You can also process each keystroke so that the characters are converted to
upper case as the user enters each one. Put the following function in a
standard module:
Public Sub ConvertToCaps(KeyAscii As Integer)
' Converts text typed into control to upper case
Dim strCharacter As String
' Convert ANSI value to character string.
strCharacter = Chr(KeyAscii)
' Convert character to upper case, then to ANSI value.
KeyAscii = Asc(UCase(strCharacter))
End Sub
In the KeyPress event procedure of the control on the form put:
ConvertToCaps KeyAscii
Ken Sheridan
Stafford, England
Ask a Question
Want to reply to this thread or ask your own question?
You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.