Results 1 to 3 of 3

Search Function in UserForm

Threaded View

  1. #1
    Registered User
    Join Date
    06-03-2011
    Location
    Florida
    MS-Off Ver
    Excel 2010
    Posts
    46

    Search Function in UserForm

    Hello, l have this form of search,(see in Attach), and works very well, but problem is that it search only in column A, I want to Search at the same time together in column A and in column B. example One "Johan" is in a column A and another is in column B, I want to find all in column A and In column B, to display all results in listbox.

    Thank You.

    Private Sub TextBox1_Change()
        Dim rng As Range, e
        With Me
            .ListBox1.Clear
            If Len(.TextBox1.Value) Then
                For Each e In Sheets("sheet1").Cells(1).CurrentRegion.Columns(1).Offset(1).Value
                    If (e <> "") * (e Like "*" & .TextBox1.Value & "*") Then
                        .ListBox1.AddItem e
                    End If
                Next
                With .ListBox1
                    If .ListCount > 0 Then .ListIndex = 0
                End With
            End If
        End With
    End Sub
    Attached Files Attached Files
    Last edited by johan12; 10-01-2013 at 08:05 PM.

Thread Information

Users Browsing this Thread

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

Similar Threads

  1. Userform Search Function Autofilter Results and Repopulate Userform
    By cindy71 in forum Excel Programming / VBA / Macros
    Replies: 0
    Last Post: 08-16-2012, 03:46 PM
  2. [SOLVED] Add search function textbox in userform
    By Nu2Java in forum Excel Programming / VBA / Macros
    Replies: 17
    Last Post: 04-23-2012, 01:47 PM
  3. [SOLVED] Userform Find (VLOOKUP) function search string problem
    By TalResha in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 06-17-2011, 04:14 AM
  4. UserForm to search sheet, show results on separate userform?
    By egemenkepekci in forum Excel Programming / VBA / Macros
    Replies: 4
    Last Post: 05-25-2010, 01:06 PM
  5. Userform search and edit function help
    By adjustermn in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 02-08-2010, 03:35 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