Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 440
Default Userform text box formatting

Is it possible to force Proper Case for any text typed into a User Form text
box?
Thanks.
--
Traa Dy Liooar

Jock
  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 35,218
Default Userform text box formatting

No. But you can change it whenever you want--when the user leaves the textbox
(Textbox1_AfterUpdate???)

Jock wrote:

Is it possible to force Proper Case for any text typed into a User Form text
box?
Thanks.
--
Traa Dy Liooar

Jock


--

Dave Peterson
  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 5,934
Default Userform text box formatting

As long as your TextBox will not contain too much text (things might get
sluggish otherwise), you can probably use this KeyUp event code to do what
you want...

Private Sub TextBox1_KeyUp(ByVal KeyCode As MSForms.ReturnInteger, _
ByVal Shift As Integer)
Dim Position As Long
Position = TextBox1.SelStart
TextBox1.Text = StrConv(TextBox1.Text, vbProperCase)
TextBox1.SelStart = Position
End Sub

--
Rick (MVP - Excel)


"Jock" wrote in message
...
Is it possible to force Proper Case for any text typed into a User Form
text
box?
Thanks.
--
Traa Dy Liooar

Jock


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
Userform Text Box Formatting amit Excel Programming 1 May 5th 08 07:07 AM
Formatting UserForm Text Field as Numeric Paul D. Simon Excel Programming 4 January 17th 08 12:19 PM
Formatting a Text Box on a UserForm Carlee Excel Programming 0 March 23rd 07 04:46 PM
UserForm text box Date formatting Dan Excel Programming 2 November 1st 04 04:38 AM
formatting text in TextBox in UserForm Kevin Excel Programming 2 November 7th 03 01:34 PM


All times are GMT +1. The time now is 09:50 PM.

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"