+ Reply to Thread
Results 1 to 7 of 7

Use TexBox to filter ListBox

  1. #1
    Registered User
    Join Date
    01-13-2014
    Location
    Azores
    MS-Off Ver
    Excel 2010
    Posts
    4

    Lightbulb Use TexBox to filter ListBox

    Hello. I have a workbook with a lot of sheets and some sheets had the same name but i add a number to change (PD-680-C, PD-680-C 1, PD-680-C 2). But now i want to create an useform to help me find the worksheet that i need to work.
    I creat an useform with a textbox1 and a listbox1 and a shortcut (ctrl+l) in keybord to go to the useform.

    When i press ctrl+l i have the textbox1 clear and i have the listbox1 with all sheetnames.

    I use this code:

    Please Login or Register  to view this content.
    But now, i want to filter the sheetnames, using the textbox1 (when i insert PD, in the listbox i have all sheetnames that's countain "PD") and when i click in same sheetname i go to there.

    Sorry my poor english, but i'm portuguese :D

    Regards
    Last edited by djokanice; 01-13-2014 at 11:27 AM.

  2. #2
    Forum Guru Izandol's Avatar
    Join Date
    03-29-2012
    Location
    *
    MS-Off Ver
    Excel 20(03|10|13)
    Posts
    2,581

    Re: Use TexBox to filter ListBox

    Userform code example may be:
    Please Login or Register  to view this content.
    • Please remember to mark threads Solved with Thread Tools link at top of page.
    • Please use code tags when posting code: [code]Place your code here[/code]
    • Please read Forum Rules

  3. #3
    Registered User
    Join Date
    01-13-2014
    Location
    Azores
    MS-Off Ver
    Excel 2010
    Posts
    4

    Re: Use TexBox to filter ListBox

    Give me an error "13": Type Mismatch and yellow in "vList = Filter(aSheets, Me.TextBox1.Text, True, vbTextCompare)"

    First i do this code and i have the same problem:

    Please Login or Register  to view this content.
    Last edited by djokanice; 01-13-2014 at 11:19 AM.

  4. #4
    Forum Expert Fotis1991's Avatar
    Join Date
    10-11-2011
    Location
    Athens(The homeland of the Democracy!). Greece
    MS-Off Ver
    Excel 1997!&2003 & 2007&2010
    Posts
    13,744

    Re: Use TexBox to filter ListBox

    Welcome to the forum.

    We'd like to continue to help you but first..

    Pls take some minutes to read forum rules and specially-in this case- rule#3
    Regards

    Fotis.

    -This is my Greek whisper to Europe.

    --Remember, saying thanks only takes a second or two. Click the little star * below, to give some Rep if you think an answer deserves it.

    Advanced Excel Techniques: http://excelxor.com/

    --KISS(Keep it simple Stupid)

    --Bring them back.

    ---See about Acropolis of Athens.

    --Visit Greece.

  5. #5
    Registered User
    Join Date
    01-13-2014
    Location
    Azores
    MS-Off Ver
    Excel 2010
    Posts
    4

    Re: Use TexBox to filter ListBox

    Thank for the alert Now that's right :D

  6. #6
    Forum Expert Fotis1991's Avatar
    Join Date
    10-11-2011
    Location
    Athens(The homeland of the Democracy!). Greece
    MS-Off Ver
    Excel 1997!&2003 & 2007&2010
    Posts
    13,744

    Re: Use TexBox to filter ListBox

    Quote Originally Posted by djokanice View Post
    Thank for the alert Now that's right :D
    Not exactly!

    Pls do the same in your first post!

  7. #7
    Registered User
    Join Date
    01-13-2014
    Location
    Azores
    MS-Off Ver
    Excel 2010
    Posts
    4

    Re: Use TexBox to filter ListBox

    Now that's right Someano have an idea to help me?

+ 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. Filter Listbox
    By Sniper in forum Excel Programming / VBA / Macros
    Replies: 6
    Last Post: 06-27-2014, 05:16 AM
  2. Filter listbox
    By sohaila in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 07-20-2013, 03:26 AM
  3. [SOLVED] showing message box if the result of texbox doesn't match with the range then clear texbox
    By hamidrezaxy in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 06-20-2013, 01:04 PM
  4. listbox vs filter
    By ahmad123 in forum Excel Programming / VBA / Macros
    Replies: 10
    Last Post: 06-14-2011, 02:13 AM
  5. Can't get listbox which displays rows in sheet to add texbox value to selected row
    By Julesdude in forum Excel Programming / VBA / Macros
    Replies: 16
    Last Post: 07-02-2010, 01:43 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