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
Re: The best string alternative to .seltext ?
Hi,
Can't you just use Mid$?
zaza
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...
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 :cool:
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.