Private Sub Text1_Change()
Dim x As Integer
If Len(Trim(Text1.Text)) = 1 Then
Text2.Text = UCase(Mid(Text1.Text, 1, 1))
ElseIf InStr(1, Text1.Text, " ", 1) > 0 Then
x = InStr(1, Text1.Text, " ", 1)
Text2.Text = UCase(Mid(Text1.Text, 1, 1)) + Mid(Text1.Text, 2, x - 1) + UCase(Mid(Text1.Text, x + 1, 1)) + Mid(Text1.Text, x + 2, Len(Text1.Text))
Else
Text2.Text = UCase(Mid(Text1.Text, 1, 1)) + Mid(Text1.Text, 2, Len(Text1.Text))
End If
End Sub