Option Explicit
Dim strFull As String
Private Sub cmdExit_Click()
Unload Me
End Sub
Private Function PCase(strVar As String) As String
PCase = UCase(Mid(strVar, 1, 1)) & LCase(Mid(strVar, 2, Len(strVar)))
End Function
Private Sub cmdNew_Click()
strFull = PCase(txtFirst.Text) & "" & _
UCase(Mid(txtMiddle.Text, 1, 1)) & "" & _
PCase(txtLast.Text)
lblFull.Caption = strFull
End Sub
Private Sub cmdReset_Click()
txtFirst.Text = ""
txtMiddle.Text = ""
txtLast.Text = ""
lblFull.Caption = ""
txtFirst.SetFocus
End Sub
This post has been edited by Martyr2: 25 September 2011 - 09:44 AM
Reason for edit:: Please use code tags in the future, thanks! :)

New Topic/Question
Reply



MultiQuote




|