Results 1 to 5 of 5

Thread: The best string alternative to .seltext ?

  1. #1

    Thread Starter
    Hyperactive Member
    Join Date
    Sep 2004
    Location
    Manchester
    Posts
    266

    Talking The best string alternative to .seltext ?

    Hi,

    Quite a basic question now.
    Sure, with a textbox selecting text and then storing that in a variable is easy using the .seltext property but what is the best way to "select" text in a non-oject orientated string.
    Would it be best to use Instr() to find the word position at which you want to start and end and then loop through every letter betwen these values adding it to a different string (the "selection" string) ??

    Much appreciated,

    Jord

  2. #2
    Frenzied Member zaza's Avatar
    Join Date
    Apr 2001
    Location
    Borneo Rainforest Habits: Scratching
    Posts
    1,486

    Re: The best string alternative to .seltext ?

    Hi,

    Can't you just use Mid$?

    zaza

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

    Re: The best string alternative to .seltext ?

    what do you mean "non-object" ?

    if its not in an object why do you need to "select" it? (Not that you even can)

    if you mean you need to search for a string.. yes Instr() to find the start...
    Mid() to "grab" it...
    JPnyc rocks!! (Just ask him!)
    If u have your answer please go to the thread tools and click "Mark Thread Resolved"

  4. #4

    Thread Starter
    Hyperactive Member
    Join Date
    Sep 2004
    Location
    Manchester
    Posts
    266

    Re: The best string alternative to .seltext ?

    Quote Originally Posted by [LGS]Static
    what do you mean "non-object" ?

    if its not in an object why do you need to "select" it? (Not that you even can)

    if you mean you need to search for a string.. yes Instr() to find the start...
    Mid() to "grab" it...
    Ah yes! Forgot about the Mid$ () function!
    VB please you just when you are down

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

    Re: The best string alternative to .seltext ?

    zaza gets credit for that..(said it first ) I was just trying to "clarify" what you are asking.
    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