Code:
Private Function Fstrings(strInput1 As String, strInput2 As String)
Fstrings = Left(strInput2, 2) & Left(strInput1, 2)
End Function
This will return the first two characters of strInput2 and the FIRST two characters of strInput1.
function procedure that concatenates the
last 2 letters of Input2 and the first 2 letters of Input1
User enters
dog and
cat, lblAnswer displays
atdo.
I would think you would need to use the function RIGHT() strInput2 to get the last two characters:
(code with June's suggestion)
Code:
Private Sub cmdFStrings_Click()
Dim strResult As String
strInput1 = txtInput1
strInput2 = txtInput2
strResult = Fstrings(strInput1, strInput2)
Me.lblAnswer.Caption = strResult
End Sub
Private Function Fstrings(strInput1 As String, strInput2 As String)
Fstrings = Right(strInput2, 2) & Left(strInput1, 2)
End Function