Results 1 to 2 of 2

Thread: Cross reference .contains?

  1. #1

    Thread Starter
    Hyperactive Member
    Join Date
    Apr 2009
    Posts
    358

    Cross reference .contains?

    How can I cross reference a .contains for two textboxes? like
    vb Code:
    1. for each word in textbox1.text
    2. if textbox2.text.contains(word) then
    3. msgbox("There was a word found that should not be there",msgboxstyle.critical,"Invalid")
    4. end if
    5. next
    Would I need to do a RegEx to get every word in the textobox? Or should i just use a listbox and do a for each I as item in listbox1.items?
    Please bless this mess!
    Sorry if my posts are misleading or sometimes rude, I'm just trying to get information so try to help me out.

  2. #2
    PowerPoster stanav's Avatar
    Join Date
    Jul 2006
    Location
    Providence, RI - USA
    Posts
    9,290

    Re: Cross reference .contains?

    You need to split 1st textbox.text by the space to get an array of words. You then loop through the array, test if the 2nd textbox.text contains the current word in the 1st array.
    Let us have faith that right makes might, and in that faith, let us, to the end, dare to do our duty as we understand it.
    - Abraham Lincoln -

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  



Click Here to Expand Forum to Full Width