473,382 Members | 1,615 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,382 software developers and data experts.

Selecting Each words from text box

devonknows
137 100+
ok this might sound like a stupid question, well it is, but how do i find the amount of words in txtsearchstring.text, i want to decipher how many words are in txtsearchstring.text and then if there is more than one, insert a symbol in between each word but not at the end, for example the google search engine,

say i put the text - This is a test, in txtsearchstring.text, then clicked go, it would go to this website: -
http://www.google.co.uk/search?hl=en&q=This+is+a+test

so if anyone can help with this i would be most grateful, jus to get the words of the textbox and insert a + between them, but not at the end,

hope someone can help :D


Kind Regards
Devon.
Dec 4 '06 #1
2 1340
ok this might sound like a stupid question, well it is, but how do i find the amount of words in txtsearchstring.text, i want to decipher how many words are in txtsearchstring.text and then if there is more than one, insert a symbol in between each word but not at the end, for example the google search engine,

say i put the text - This is a test, in txtsearchstring.text, then clicked go, it would go to this website: -
http://www.google.co.uk/search?hl=en&q=This+is+a+test

so if anyone can help with this i would be most grateful, jus to get the words of the textbox and insert a + between them, but not at the end,

hope someone can help :D

Kind Regards
Devon.
sText = "This is a word"
nText = ""
For x = 1 To Len(sText)
If Mid(sText, x, 1) = " " Then
nText = nText + "+"
Else
nText = nText + Mid(sText, x, 1)
End If
Next x
searchText.Text = "http://www.google.co.uk/search?hl=en&q=" + nText
Dec 5 '06 #2
devonknows
137 100+
thank you very much, come in real handy, as if i didnt even think about using len() oops, oh well thanks ideed

Kind Regards
Devon.
Dec 5 '06 #3

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

Similar topics

3
by: Simon G Best | last post by:
Hello! The C++ standard library provides facilities for finding out the sizes (and other such stuff) of numeric types (::std::numeric_limits<>, for example). What I would like to do is to...
9
by: Gary | last post by:
Hello, Is it possible to dynamically update a textbox with words chosen from a list using form checkboxes and javascript? Gary
0
by: Kim | last post by:
Hello, I am selecting data from a text file in the following format: INSERT INTO SELECT * FROM " & sSource & " IN '' " & _ "'text;Database=" & sPath & ";FMT=Delimited;HDR=No' " & _ "WHERE =...
1
by: Ramesh | last post by:
hi, I am selecting fields from three table for manupulating data and i want to display total number of records selected. But i am always getting -1 value, eventhough 1000 of records are selected....
3
by: larry mckay | last post by:
anyone have the code to select and listview item or row (subitems) after a doubleclick event from a listview. *** Sent via Developersdex http://www.developersdex.com *** Don't just participate...
42
by: Dooglo | last post by:
I'm new VB and programming all together, but I'm getting he hang of it. My question is; I'm writting a program to figure square feet and yards when the user inputs "Length in feet and inch (...
2
by: Abubakar | last post by:
Hi, In a normal Windows.Forms.TextBox control, I want to be able to select a text (ie highlight, this is by default possible) and than be able to drag that text through my mouse pointer to another...
4
by: darrel | last post by:
I have a DDL list along these lines: item value="1" text="a" item value="2" text="b" item value="3" text="c" item value="2" text="d" item value="2" text="e" item value="1" text="f" item...
5
by: hollyquinn | last post by:
Hi I am working with a web application where I am selecting values from a SQL Server 2005 database and then loading the values into different controls on my page. Most of the values load with no...
0
by: Faith0G | last post by:
I am starting a new it consulting business and it's been a while since I setup a new website. Is wordpress still the best web based software for hosting a 5 page website? The webpages will be...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 3 Apr 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome former...
0
by: ryjfgjl | last post by:
In our work, we often need to import Excel data into databases (such as MySQL, SQL Server, Oracle) for data analysis and processing. Usually, we use database tools like Navicat or the Excel import...
0
by: taylorcarr | last post by:
A Canon printer is a smart device known for being advanced, efficient, and reliable. It is designed for home, office, and hybrid workspace use and can also be used for a variety of purposes. However,...
0
by: aa123db | last post by:
Variable and constants Use var or let for variables and const fror constants. Var foo ='bar'; Let foo ='bar';const baz ='bar'; Functions function $name$ ($parameters$) { } ...
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
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...

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.