Userform text box formatting

  • Thread starter Thread starter Jock
  • Start date Start date
No. But you can change it whenever you want--when the user leaves the textbox
(Textbox1_AfterUpdate???)
 
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
 
Back
Top