Results 1 to 2 of 2

Thread: help with textbox last line detection

  1. #1

    Thread Starter
    New Member
    Join Date
    Feb 2001
    Posts
    2

    Unhappy

    ok, i need to do something in my program but i dont know how to do it. I need the program to detect the last line of text1.text. Now, once it detects the last line, if the last line of text1.text is equal to text2.text, then it exits the sub. but if they arent equal then a message box comes up and says "not equal". i have some idea on how to do this. But i dont know how to detect the last line of a text box. Can someone help me? if you know how to do this then please E-Mail me at

    [email protected]

    -thanks

  2. #2
    PowerPoster Static's Avatar
    Join Date
    Oct 2000
    Location
    Rochester, NY
    Posts
    9,390

    try this

    Code:
    Option Compare text   'cant forget this!
    
    Dim tmp() As String 
    tmp = SPlit(text1.text,vbcrlf) 
    x = UBound(tmp) 
    If tmp(x) = text2.text Then 
    'do whatever
    Else 
    MsgBox Not" equal" 
    End If
    of the top of my head.....see if it works
    JPnyc rocks!! (Just ask him!)
    If u have your answer please go to the thread tools and click "Mark Thread Resolved"

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