Home |
Search |
Today's Posts |
|
#1
![]()
Posted to microsoft.public.excel.misc
|
|||
|
|||
![]() Hi, On a Userform, does anyone know if you can set a textbox up so that when characters are entered they are automatically changed to upper case? Cheers Jim. -- Jimbo1 ------------------------------------------------------------------------ Jimbo1's Profile: http://www.excelforum.com/member.php...o&userid=30637 View this thread: http://www.excelforum.com/showthread...hreadid=534502 |
#2
![]()
Posted to microsoft.public.excel.misc
|
|||
|
|||
![]()
One way is to check after each character is typed:
Option Explicit Dim BlkProc As Boolean Private Sub TextBox1_Change() If BlkProc = True Then Exit Sub BlkProc = True Me.TextBox1.Value = UCase(Me.TextBox1.Value) BlkProc = False End Sub Another way is to just let the user type what they want and make it uppercase when they leave the textbox. Option Explicit Private Sub TextBox1_Exit(ByVal Cancel As MSForms.ReturnBoolean) Me.TextBox1.Value = UCase(Me.TextBox1.Value) End Sub And you could just make it uppercase when your code needs it and let the textbox display what the user typed. Option Explicit Private Sub CommandButton1_Click() MsgBox UCase(Me.TextBox1.Value) End Sub Jimbo1 wrote: Hi, On a Userform, does anyone know if you can set a textbox up so that when characters are entered they are automatically changed to upper case? Cheers Jim. -- Jimbo1 ------------------------------------------------------------------------ Jimbo1's Profile: http://www.excelforum.com/member.php...o&userid=30637 View this thread: http://www.excelforum.com/showthread...hreadid=534502 -- Dave Peterson |
#3
![]()
Posted to microsoft.public.excel.misc
|
|||
|
|||
![]() Ive Found that this works Well Private Sub Textbox1_Change() TextBox1.Text = UCase(TextBox1.Text) End Sub Cheers -- Jimbo1 ------------------------------------------------------------------------ Jimbo1's Profile: http://www.excelforum.com/member.php...o&userid=30637 View this thread: http://www.excelforum.com/showthread...hreadid=534502 |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
Textbox moves position when Printing? | Excel Discussion (Misc queries) | |||
Legnth of text in textbox control | Excel Discussion (Misc queries) | |||
textbox scrollbar disappears | Excel Discussion (Misc queries) | |||
Rich Textbox | Excel Discussion (Misc queries) | |||
manipulating textbox in chart | Charts and Charting in Excel |