Results 1 to 2 of 2

Thread: Detecting last line of a textbox

  1. #1

    Thread Starter
    New Member
    Join Date
    Feb 2001
    Posts
    2
    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

  2. #2
    Guest
    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

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  



Click Here to Expand Forum to Full Width