|
-
Jul 26th, 2005, 02:58 PM
#1
Thread Starter
Hyperactive Member
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
-
Jul 26th, 2005, 03:04 PM
#2
Re: The best string alternative to .seltext ?
Hi,
Can't you just use Mid$?
zaza
-
Jul 26th, 2005, 03:43 PM
#3
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"
-
Jul 26th, 2005, 03:51 PM
#4
Thread Starter
Hyperactive Member
Re: The best string alternative to .seltext ?
 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
-
Jul 26th, 2005, 03:53 PM
#5
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
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|