Results 1 to 7 of 7

Thread: Search a texbox

  1. #1

    Thread Starter
    Addicted Member Stick's Avatar
    Join Date
    Aug 1999
    Location
    Iowa
    Posts
    152
    How Do I searech a TextBox !
    Dim X
    X = Inputbox("Type Stuff to Search")
    WHATEVER THE CODE IS TO SEARCH TEXT1.Text



  2. #2
    Addicted Member
    Join Date
    May 2000
    Posts
    240

    I dont get it??

    What do you mean by search?
    I dont understand with the information you gave.
    Could you please explain more?

  3. #3
    Addicted Member LAURENS's Avatar
    Join Date
    Jan 2000
    Location
    Utrecht, the Netherlands
    Posts
    138
    You have to elaborate a bit on it but it boils down to this:

    Private Sub Command1_Click()
    Dim strTextToSearch As String

    strTextToSearch = InputBox("Enter text to search")

    If InStr$(1, Text1, strTextToSearch) <> 0 Then
    MsgBox "Found it"
    else
    MsgBox "Not there"
    End If

    End Sub
    Regards,
    Laurens

    Using VB5 Enterprise edition SP3
    VB6 Enterprise edition SP5

  4. #4
    Addicted Member
    Join Date
    May 2000
    Posts
    240

    Question Please explain?

    LAURENS Could you please explain the purpose of searching a text box..why would someone want to search a textbox? is it related to passwords? or security or spell checking?
    The idea seems cool but i dont see a reason for it.
    Thanks.

  5. #5
    _______ HeSaidJoe's Avatar
    Join Date
    Jun 1999
    Location
    Canada
    Posts
    3,946

    file

    in school sometimes you have to read a text file into a text box...perhaps it's a learning curve and someone needs to search a textbox for a given string.
    "A myth is not the succession of individual images,
    but an integerated meaningful entity,
    reflecting a distinct aspect of the real world."

    ___ Adolf Jensen

  6. #6
    Addicted Member LAURENS's Avatar
    Join Date
    Jan 2000
    Location
    Utrecht, the Netherlands
    Posts
    138
    I don't know why Stick wants to search a textbox, I'm just trying to answer his question.
    Ask him.
    Regards,
    Laurens

    Using VB5 Enterprise edition SP3
    VB6 Enterprise edition SP5

  7. #7

    Thread Starter
    Addicted Member Stick's Avatar
    Join Date
    Aug 1999
    Location
    Iowa
    Posts
    152

    Exclamation Wow! I Din't know that it was that big of deal!

    I want to search a text box cause my app. get's a list off the internet and need to make sure certain things are in their.
    But what's it matter what I need it for thier may be other that will use this code to for other apps.


    Thanks For Helping me out!



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