string comparison in VB.net

Please support our VB.NET advertiser: Intel Parallel Studio Home
Reply

Join Date: Nov 2004
Posts: 2
Reputation: gencor45 is an unknown quantity at this point 
Solved Threads: 0
gencor45 gencor45 is offline Offline
Newbie Poster

string comparison in VB.net

 
0
  #1
Nov 15th, 2004
I need suggestions on how to compare a string from a textbox to a combo box
list? I then need to take any items that the string is similiar to and display them in a message box? Im very confused on how to do this? I would appreciate any input>
Reply With Quote Quick reply to this message  
Join Date: Dec 2004
Posts: 3
Reputation: darrindarrinnet is an unknown quantity at this point 
Solved Threads: 0
darrindarrinnet darrindarrinnet is offline Offline
Newbie Poster

Re: string comparison in VB.net

 
0
  #2
Dec 5th, 2004
The InStr("String", "String you are looking for") will return > 0 if a string is found.

Hence if StingA = "a b c d xx d c b a"

Dim StringSearch as integer

StringSearch = Instr(StringA, "xx")

StringSearch should return 9 [the position in the string of "xx"].

Now all you have to do is use the ComboBox list index property to search each of the combo boxes values and identify if the string is present in them.
Reply With Quote Quick reply to this message  
Reply

This thread is more than three months old.
Perhaps start a new thread instead?
Message:


Thread Tools Search this Thread



About Us | Contact Us | Advertise | DaniWeb | Acceptable Use Policy | RSS Feed

©2003 - 2009 DaniWeb® LLC