How do i make it so my program takes the last line of text1.text and puts it in text2.text? If some one could please help me out id appreciate it :)
Email me at [email protected] if you know.
PS - It MUST be a text box
thanks alot
Printable View
How do i make it so my program takes the last line of text1.text and puts it in text2.text? If some one could please help me out id appreciate it :)
Email me at [email protected] if you know.
PS - It MUST be a text box
thanks alot
Use the Split function.
Code:Private Sub Command1_Click()
Dim vArray As Variant
Dim iLines As Integer
vArray = Split(Text1.Text, vbCrLf)
iLines = UBound(vArray)
Text2.text = vArray(iLines)
End Sub