+ Reply to Thread
Results 1 to 2 of 2

search in listbox

Hybrid View

nyfmpha search in listbox 03-02-2015, 07:47 AM
nyfmpha Re: search in listbox 03-02-2015, 10:37 AM
  1. #1
    Registered User
    Join Date
    01-22-2010
    Location
    syria
    MS-Off Ver
    Excel 2007
    Posts
    10

    search in listbox

    i have textbox and listbox
    i want to find value in listbox after typing it in textbox
    i used this code
    Private Sub TextBox1_Change()
    Dim s As String, x
    Dim i As Integer
    s = TextBox7.Text
    If TextBox7.Text = "" Then 
        Exit Sub
    End If
    x = Application.Index(ListBox1.List, 0,1)
    If IsError(Application.Match(s & "*", x, 0)) Then
        MsgBox "No match"
        ListBox1.ListIndex = -1
        Exit Sub
    End If
    For i = 1 To UBound(x)
        If x(i,1) Like UCase(s) & "*" Then ListBox1.List(i-1).Selected = True
    Next
    End Sub
    but i could nt find the next value
    the code give me the first value only
    help me please
    sorry for my bad language

  2. #2
    Registered User
    Join Date
    01-22-2010
    Location
    syria
    MS-Off Ver
    Excel 2007
    Posts
    10

    Re: search in listbox

    no result ????

+ Reply to Thread

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Similar Threads

  1. Search in a listbox
    By Jddoyon in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 07-01-2014, 01:53 PM
  2. Looking for better Search Method Listbox VBA
    By kpnaish in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 09-14-2013, 12:01 PM
  3. Search listbox from textbox
    By zplugger in forum Excel General
    Replies: 12
    Last Post: 08-23-2012, 08:11 PM
  4. [SOLVED] Textbox to search listbox
    By zplugger in forum Excel Programming / VBA / Macros
    Replies: 4
    Last Post: 08-22-2012, 08:25 AM
  5. Listbox value return from search
    By Mcat in forum Excel Programming / VBA / Macros
    Replies: 3
    Last Post: 11-30-2005, 06:10 PM

Bookmarks

Posting Permissions

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

Search Engine Friendly URLs by vBSEO 3.6.0 RC 1