Results 1 to 3 of 3

Thread: [RESOLVED] Forgotten String Parser

  1. #1

    Thread Starter
    New Member
    Join Date
    Jan 2005
    Posts
    8

    Resolved [RESOLVED] Forgotten String Parser

    Last year (2010) I came across a FANTASTIC command that allowed me to take a string of variables with a common delimiter and break it all back out into separate variables (possibly an array) with one statement.

    Example:
    TS = "123|456789|A|BCDEF|GHI|JK"
    -or possibly-
    TS = "123&456789&A&BCDEF&GHI&JK"

    Results:
    A(0) = "123"
    A(1) = "456789"
    A(2) = "A"
    A(3) = "BCDEF"
    A(4) = "GHI"
    A(5) = "JK"

    As long as the delimiter was a unique specifiable character, this one-statement command could break it out into elements.

    Please, PLEASE somebody jog my memory and point me in the right direction.

    Thanks in advance

    Geoffrey

  2. #2
    Fanatic Member BlindSniper's Avatar
    Join Date
    Jan 2011
    Location
    South Africa
    Posts
    865

    Re: Forgotten String Parser

    TS = "123&456789&A&BCDEF&GHI&JK"
    Ts.Split("&"c)

    Useful CodeBank Entries of mine
    Expand Function
    Code Compiler
    Sudoku Solver
    HotKeyHandler Class

    Read this to get Effective help on VBForums
    Hitchhiker's Guide to Getting Help at VBF

  3. #3

    Thread Starter
    New Member
    Join Date
    Jan 2005
    Posts
    8

    Resolved [RESOLVED] Forgotten String Parser

    Yes!!! Thank you! I spent two days looking and you solved in 10 minutes. \

    Very much appreciated!

Tags for this Thread

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