Results 1 to 40 of 46

Thread: [RESOLVED] Detect words in a listbox (Resolved)

Threaded View

  1. #1

    Thread Starter
    PowerPoster Nightwalker83's Avatar
    Join Date
    Dec 2001
    Location
    Adelaide, Australia
    Posts
    13,344

    Resolved [RESOLVED] Detect words in a listbox (Resolved)

    Hi,

    I am trying to detect words that are in a listbox by typing a word in a textbox then click if the word is in the box.

    VB Code:
    1. Private Sub Command1_Click()
    2. For b = 0 To frmSetup.Lstblock.ListCount
    3. If Text1.Text = frmSetup.Lstblock.List(b) Then
    4. MsgBox ("Word is not allowed")
    5. Else
    6. If Not Text1.Text = Text1.Text & frmSetup.Lstblock.List(b) Then
    7. Exit Sub
    8. End If
    9. End If
    10. Next b
    11. frmSetup.Show
    12. End Sub

    This code works only when I type in the word that is the first word listed in the listbox. How can I make in so it checks for all the wors typed into the listbox?
    Last edited by Nightwalker83; Oct 18th, 2002 at 06:13 PM.
    when you quote a post could you please do it via the "Reply With Quote" button or if it multiple post click the "''+" button then "Reply With Quote" button.
    If this thread is finished with please mark it "Resolved" by selecting "Mark thread resolved" from the "Thread tools" drop-down menu.
    https://get.cryptobrowser.site/30/4111672

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