This should be simple enough.
Code:Private Sub Command1_Click() Dim pos As Integer pos = InStrRev(Text1.Text, vbNewLine) If pos = 0 Then MsgBox "The last line is: " & Text1.Text Else MsgBox "The last line is: " & Mid(Text1.Text, pos + 2) End If End Sub




Reply With Quote