|
-
Dec 30th, 2005, 09:58 AM
#1
Thread Starter
New Member
Searching text for strings and moving it to text boxes
Hey all,
Got a quick question about the best way to search text.
I currently search a textbox (txtdata.text) for a set of about 30 words (Ex:server1) as shown below:
Server1 88,324
Server2 65,343
Server3 54,789
Server4 99,324
~
Server30 12,234
The 1st value "server" is placed in a text box called V#.text and the associated amount is copied to a 2nd text box called R#.text.
In order to separate the 2 values I use this code:
Search21 = v21.Text
Where = InStr(txtData.Text, Search21)
If Where Then
'txtData.SetFocus
txtData.SelStart = Where - 1 + 8
txtData.SelLength = Len(Search21)
r21.Text = txtData.SelText
End If
I need this to be repeated 30 times over to get all 30 values in their boxes.
This is a huge pain & probably the worst way to do it but it works.
Anyone have a better idea on how to do this?
Thanks
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
|