Results 1 to 4 of 4

Thread: splitting line

  1. #1

    Thread Starter
    New Member
    Join Date
    Jan 2006
    Posts
    5

    splitting line



    thanks

    Last edited by amxJ; Jan 26th, 2006 at 08:13 PM.

  2. #2
    Frenzied Member Jmacp's Avatar
    Join Date
    Jul 2003
    Location
    UK
    Posts
    1,959

    Re: finding text

    VB Code:
    1. Dim strString As String
    2. strString = "name=SOMETHINGmessage=SOMETHING"
    3.  
    4. MsgBox Split(Split(strString, "=")(1), "message")(0)
    5. MsgBox Mid(strString, InStrRev(strString, "=") + 1, Len(strString) - InStrRev(strString, "=") + 1)

  3. #3
    I'm about to be a PowerPoster! Hack's Avatar
    Join Date
    Aug 2001
    Location
    Searching for mendhak
    Posts
    58,333

    Re: finding text

    Welcome to the forums.

    You will need to be a bit more specific.

    Where is the line? Are you talking about text in a textbox? Text in a file?

    When we have what we are looking for, what are we searching? A database field? A textbox? A text file? What?

  4. #4
    Smitten by reality Harsh Gupta's Avatar
    Join Date
    Feb 2005
    Posts
    2,938

    Re: finding text

    try this:
    VB Code:
    1. Dim myString$
    2. Private Sub Command1_Click()
    3.  
    4.     myString = "name=SOMETHINGmessage=SOMETHINGELSE"
    5.     MsgBox "name = " & Split(Split(myString, "=")(1), "message")(0)
    6.     MsgBox "message = " & Mid$(myString, InStrRev(myString, "=") + 1)
    7.  
    8. End Sub

    EDIT: Not again
    Show Appreciation. Rate Posts.

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