![]() |
Textbox
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=534510 |
Textbox
Hi Jim,
using textbox_change event you can change its value to upper case. Something like this: Private Sub textboxA_Change( ) application.enableevents=false textboxA.value=ucase(textboxA.value) application.enableevents=true end sub I hope I didn't mistype, I wrote it from scratch, didn't test it in VBA. Regards, Ivan |
Textbox
Try:
Private Sub Textbox1_Change() Textbox1.Text = UCase(Textbox1.Text) 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=534510 |
Textbox
Use the textbox change event and upshift it
Private Sub TextBox1_Change() With Me.TextBox1 .Text = UCase(.Text) End With End Sub -- HTH Bob Phillips (remove nothere from email address if mailing direct) "Jimbo1" wrote in message ... 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=534510 |
Textbox
Excellent, works perfectly. Cheers Guys -- Jimbo1 ------------------------------------------------------------------------ Jimbo1's Profile: http://www.excelforum.com/member.php...o&userid=30637 View this thread: http://www.excelforum.com/showthread...hreadid=534510 |
Textbox
EnableEvents have no bearing on userforms.
-- HTH Bob Phillips (remove nothere from email address if mailing direct) "Ivan Raiminius" wrote in message oups.com... Hi Jim, using textbox_change event you can change its value to upper case. Something like this: Private Sub textboxA_Change( ) application.enableevents=false textboxA.value=ucase(textboxA.value) application.enableevents=true end sub I hope I didn't mistype, I wrote it from scratch, didn't test it in VBA. Regards, Ivan |
All times are GMT +1. The time now is 12:02 AM. |
Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
ExcelBanter.com