+ Reply to Thread
Results 1 to 3 of 3

userform / autofilter / listbox

  1. #1
    Registered User
    Join Date
    01-22-2013
    Location
    Poland
    MS-Off Ver
    Excel 365 64bits
    Posts
    46

    userform / autofilter / listbox

    Dear All,

    i stuck with the problem to build UserForm with textboxes.
    Those textboxes should filter the data in the worksheet and filtrated data should populate the list box on the userform.
    \1

    that's the idea how it should look like.

    I have following issues:
    1. I have got the code to filter in the "Autofilter criteria 1", see picture
    the code is basic:
    Private Sub TextBox1_Change()
    Dim numele$
    numele$ = Me.TextBox1.Value
    If numele2$ <> "" Then

    Worksheets("Sheet1").Range("A3:BC500").AutoFilter _
    field:=3, _
    Criteria1:="*" & TextBox1.Text & "*", _

    VisibleDropDown:=False


    Else
    Sheet1.AutoFilterMode = False
    End If
    it works well.

    but when i am trying in the textbox2 enter additional criteria i got an error (Syntax error).
    i do not understand why.
    without the userform the code works in the worksheet.


    2. When i get filtrated data from textbox 1 the content on the listbox1 is not changed.
    can you please let me know what i should to to populate the listbox1 with filtrated data?



    thanks in advance for any comments form your side.

  2. #2
    Forum Expert
    Join Date
    12-14-2012
    Location
    London England
    MS-Off Ver
    MS 365 Office Suite.
    Posts
    8,448

    Re: userform / autofilter / listbox

    Look at my Search Read Write Userform.

    Please Login or Register  to view this content.
    Attached Files Attached Files
    My General Rules if you want my help. Not aimed at any person in particular:

    1. Please Make Requests not demands, none of us get paid here.

    2. Check back on your post regularly. I will not return to a post after 4 days.
    If it is not important to you then it definitely is not important to me.

  3. #3
    Registered User
    Join Date
    01-22-2013
    Location
    Poland
    MS-Off Ver
    Excel 365 64bits
    Posts
    46

    Re: userform / autofilter / listbox

    Dear mehmetcik,

    wow and thanks for the support.
    i opened your file and i guess i will spend some days to work on it.
    once again, a big thank you!

+ 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. excel 2003 userform listbox to autofilter. Multiple criteria (beyond two)
    By vbapadawan in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 08-24-2015, 01:36 PM
  2. [SOLVED] if anything in listbox select first item, if listbox empty do nothing (listbox in userform
    By mcdermott2 in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 02-17-2015, 12:49 PM
  3. [SOLVED] copy contents of userform listbox to another userform listbox
    By cfinch100 in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 10-04-2014, 11:39 AM
  4. [SOLVED] Autofilter with criteria being the contents of a listbox on a userform
    By D.Lovell in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 06-05-2014, 07:38 PM
  5. Transfer Data From One Userform Listbox to Another Userform Listbox with 11 columns
    By sparkoft in forum Excel Programming / VBA / Macros
    Replies: 16
    Last Post: 05-18-2013, 10:54 AM
  6. userform listbox
    By tsiguy96 in forum Excel Programming / VBA / Macros
    Replies: 9
    Last Post: 02-14-2013, 11:09 PM
  7. Listbox to Listbox, no duplicates & submitting same UserForm data for each Listbox entry.
    By jamieswift1977 in forum Excel Programming / VBA / Macros
    Replies: 7
    Last Post: 12-18-2012, 12:18 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