Hmm, im not opening VB here or anything, but an obvious (but slow) way to find out would be to set an array with all the search numbers with one element per number, then check them against the master string to see if they are in it. For example, if you would like to know if 15 is in the list then if InStr(0, txtMaster.text, "15", vbTextCompare) <> 0 then it exists. Hoever be careful, because that will recognize 15 even if it is 150.
All you need two textboxes, named NumbersA and NumbersB.
NumbersA will contain the long list of numbers.
NumbersB will contain the short list of numbers, which will be looked for in NumbersA.
AnyFound will be true if any numbers in NumbersB are found in NumbersA.
i would like when it does not have one or more number message must pop up and say does not contain or if it contain a number that the long does not has message box pop and say does not contain.
Plese help me
Last edited by andrnet2004; May 30th, 2006 at 11:18 PM.
Your looping through the numbers in your short "nums to check" string, right?
Everytime you determine that the number is not in the long list (through my implementation or jeroen79's) then you append this number to a string named as strErrNums.
andrnet2004 , writing the code for you might not be much of a problem. I am assuming you are new to programming or vb. That being the case you won't be learning much if we write the code for you. Post the code that you have written, then people here will let you know what modifications need to be made. That way you will be able to learn better and more.