Results 1 to 5 of 5

Thread: Looking for people who could help me with a text search

  1. #1

    Thread Starter
    Addicted Member
    Join Date
    Jun 2011
    Posts
    137

    Looking for people who could help me with a text search

    Looking for people who could help me with a text search.
    Code that I want to make work perfectly, but it finds only one word.

    So far I have only this code.

    Code:
      Dim a As String
            Dim b As String
            a = mu1.Text
            b = InStr(mu2.Text, a)
            If b Then
                mu2.Focus()
                mu2.SelectionStart = b - 1
                mu2.SelectionLength = Len(a)
            Else
                MsgBox("No text Found!")
            End If
    I need a code which is found not only a word but also all related to my fit the found word.

    To help you understand what I really need to give the image, you will see that we have created code that I include only one word but even all the found words in accordance with the keywords I entered.



    So I need a code that after entering some word keyword could find all the other related keywords with my summary of the word to fit.

    Use textbox1 and multi textBox2 and button.
    So I want to know how do I do it?

    As you can see it finds only one word.
    But this is not what I need.
    I need it all found and keywords to highlight a full row and not just the part.

  2. #2
    Super Moderator dday9's Avatar
    Join Date
    Mar 2011
    Posts
    12,371

    Re: Looking for people who could help me with a text search

    Considering that you're using a textbox, you cannot highlight more than one word. It's just like using the find feature in internet explorer(control + f). It will give you the number of matches, just not highlight every match. In order to highlight the next match, you click the next/previous button.

    And this right here: "keywords to highlight a full row and not just the part" are you wanting to select the line that contains the keyword? I'm not quite following that statement, could you elaborate a bit?
    "Code is like humor. When you have to explain it, it is bad." - Cory House
    VbLessons | HtmlLessons | CssLessons | Code Tags | Sword of Fury - Jameram

  3. #3

    Thread Starter
    Addicted Member
    Join Date
    Jun 2011
    Posts
    137

    Re: Looking for people who could help me with a text search

    This is exactly what I want.
    I wanna select a full line and hightlight it when you click item in textbox but not just a part of text.

    This is how it should look like.
    A click on the text should not select the part of the text.
    it should choose a full line just on one click but not on double click as is usually.

    This is all what i want.
    Last edited by polas; Jul 18th, 2013 at 02:25 AM.

  4. #4
    Lively Member
    Join Date
    Jan 2013
    Posts
    66

    Re: Looking for people who could help me with a text search

    You want to hilight all lines that contain the text u have entered?

  5. #5
    PowerPoster
    Join Date
    Mar 2002
    Location
    UK
    Posts
    4,780

    Re: Looking for people who could help me with a text search

    An alternative is to use a RTB and colour the text that matches (similar to the IE yellow selection) and then a simple select full line of the 1st item if required.

Tags for this Thread

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