473,396 Members | 1,970 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,396 software developers and data experts.

Searching textbox?

Anyone have any idea how to search a textbox for a word and get the next word after it in vb6?

example:

"message" "hello"

The code should get the 2nd word, "hello".

I've been trying to find a way to do this, so far I can search for a word but can't find a way to ignore the space character between the words and copy the 2nd word up to the next space character.

Thx...
Feb 14 '08 #1
3 1103
debasisdas
8,127 Expert 4TB
Kindly post your code for reference of our experts.
Feb 14 '08 #2
werks
220 100+
I recommend this site for you PsCode just search for it. ok? Good Luck..

--
Kenneth
"Better Than Yesterday"
Feb 14 '08 #3
Bum
19
use something like

dim tstr as string 'the string you are trying to find

''look for word
dim i
i = instr(textbox.text,"message")

'look for space after word
dim k
k = instr(i + 1,textbox.text," ")

'look for space after first space, and if j returns zero then the word you want is the last word

dim j
j = instr(k + 1,textbox.text," ")
if j <> 0 then tstr = trim(mid(textbox.text,k + 1,j-k)
if j = 0 then tstr = trim(right(textbox.text,len(textbox.text) - k)))

something like that. Hope it helps,

B
Feb 14 '08 #4

Sign in to post your reply or Sign up for a free account.

Similar topics

4
by: donald | last post by:
Hi all, I have a website running asp (about to move to asp.net soon though) which has a list of DVD's I have the various pages I want, last 10, listing, full listing ect, but the one page i can't...
3
by: MoonWa | last post by:
Short of going char by char, how do I search for a pattern in the text for a textbox Thanks MoonWa
5
by: Andy | last post by:
I am having trouble using the ComboBox in my app. I am attempting to use the text from the ComboBox, to search the list box portion. However: In my "TextChanged" event: I cannot get the value...
4
by: libsfan01 | last post by:
Im not entirely sure this involves JS but bear with me... I'm looking to implement a system on a site where the user starts to type in the search box (textbox) what they are looking for and this...
1
by: sivagururaja | last post by:
Hi All, Im using ASP.NET with C#. (.NET 2005) In my page i want to allow the user to search the text from the SQL table. This is my table ID Name City State 1 Parry ...
5
by: tshad | last post by:
Does anyone have or know where I can get a some code that will check a TextBox for inappropriate language. At the moment, we need to manually check submissions for language before posting. This...
2
by: =?Utf-8?B?VGVycnk=?= | last post by:
I am implementing an 'incremental search', where as the user types into a textbox, a datagridview's current position is updated to match the first record that contains what the user has typed so...
8
by: fniles | last post by:
I am using VB.NET 2008. I would like to search a textbox (find next and find previous), and when it finds the text, move my cursor in the textbox to where the found text is. How can I do that ?...
2
by: wietmie | last post by:
Hai, i just wanna ask, is it possible to do a searching result like google using VB6.0, but google are too complicated, what i mean just, user put the searching word in the textbox, then it will...
4
by: aaronkmar | last post by:
Hello Bytes, I hope this post finds you well on this wonderful Friday! I've been kicking this code around for over a week now and cannot seem to find the correct syntax to handle all of the...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...
0
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.