Input: Duck, Daffy
I have a school assignment to create a form with several buttons. I can't get the 'Greeting' button to work. I need the return to be "Hello Daffy Duck". The entry will always be Last, First not matter what the name. I am getting a runtime error '13' "Type mismatch". What do I need to change?
Thanks!
Private Sub cmdGreeting_Click()
Dim strOutput As String
strOutput = Right(txtInput.Value, " ") & Left(txtInput.Value, ",")
lblOutPut.Caption = "Hello " & strOutput
End Sub
I have a school assignment to create a form with several buttons. I can't get the 'Greeting' button to work. I need the return to be "Hello Daffy Duck". The entry will always be Last, First not matter what the name. I am getting a runtime error '13' "Type mismatch". What do I need to change?
Thanks!
Private Sub cmdGreeting_Click()
Dim strOutput As String
strOutput = Right(txtInput.Value, " ") & Left(txtInput.Value, ",")
lblOutPut.Caption = "Hello " & strOutput
End Sub