Results 1 to 4 of 4

Thread: STRING PARSING QUESTION

  1. #1

    Thread Starter
    Lively Member
    Join Date
    Jan 1999
    Posts
    81

    Post

    How do i pull a the begining of this string but not the end..

    string = 12345/67890

    i want new_string = 12345
    any help will be most appricated

    thanks
    brooke

  2. #2
    Former Admin/Moderator MartinLiss's Avatar
    Join Date
    Sep 1999
    Location
    San Jose, CA
    Posts
    33,431

    Post

    new_string = Left$(string, 5)

    ------------------
    Marty
    What did the fish say when it hit the concrete wall?
    > > > > > "Dam!"

  3. #3

    Thread Starter
    Lively Member
    Join Date
    Jan 1999
    Posts
    81

    Post

    WHAT IF ITS 123456/799483 i want everything in front of the /

  4. #4
    Serge's Avatar
    Join Date
    Feb 1999
    Location
    Scottsdale, Arizona, USA
    Posts
    2,744

    Post

    Try this:


    Dim strText As String

    strText = "12345/abcd

    strText = Left(strText, InStr(strText, "/") - 1)



    ------------------

    Serge

    Senior Programmer Analyst
    [email protected]
    [email protected]
    ICQ#: 51055819

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