Develop a procedure that uses an InputBox to obtain a name f
Develop a procedure that uses an InputBox to obtain a name from a user. Then have the procedure manipulate the name so that its first letter is capitalized and all following letters are lowercase. Display the result with a MsgBox. Test the procedure by entering a name in capital letters.
Solution
Procedure for InputBox to obtain a name form a user:
Private Sub Command1_Click()
Dim S As String
Dim h As String
Dim t As String
Dim Final As String
Dim l As Integer
S = InputBox(\"Enter a name:\", \"Name\")
l = Len(Trim(S))
t = Right(S, l - 1)
t = UCase(Left(S, 1)) & LCase(t)
MsgBox t
End Sub
