#1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1
Default 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

  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 258
Default 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

  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 11,272
Default 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



  #4   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 4,339
Default 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


  #5   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 11,272
Default 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





  #6   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1
Default 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

Reply
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
Highlight all Text in a Textbox when the textbox is selected RPIJG[_73_] Excel Programming 3 October 28th 05 08:28 PM
HELP! I Lost The Ability To Advance From TextBox To TextBox With the ENTER Or The TAB Keys Minitman[_4_] Excel Programming 0 February 22nd 05 08:50 PM
Textbox Bug? Missing/delayed update of textbox filled via VBA MarcM Excel Programming 0 November 4th 04 05:47 PM
Textbox Bug? Missing/delayed update of textbox filled via VBA MarcM Excel Programming 0 November 4th 04 05:43 PM
UserForm TextBox to ActiveSheet TextBox over 256 characters Dan E[_2_] Excel Programming 1 July 28th 03 07:36 PM


All times are GMT +1. The time now is 03:34 AM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
Copyright ©2004-2025 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"