Hello everyone
I would like to know how can I convert a lowcase text in a text box to uppercase??
Thanks for the help
Felipe
Printable View
Hello everyone
I would like to know how can I convert a lowcase text in a text box to uppercase??
Thanks for the help
Felipe
Private Sub Command1_Click()
Dim i As Integer
Dim sTmp As String
For i = 1 To Len(Text1.Text)
sTmp = sTmp & UCase(Mid(Text1.Text, i, 1))
Next
Text1.Text = sTmp
End Sub
You could do that, but it is easier to just use this:
You could even do it this way:Code:Private Sub Command1_Click()
Text1.Text = UCase(Text1.Text)
End Sub
This example will change to text to upper case as they type.Code:Private Sub Text1_Change()
Text1.Text = UCase(Text1.Text)
Text1.SelStart = Len(Text1.Text)
End Sub
ops.. hehehe.. Your way was better..
Thanks everyone for the help
Felipe