+ Reply to Thread
Results 1 to 3 of 3

VBA Filter combobox on userform with search suggestions

Hybrid View

  1. #1
    Registered User
    Join Date
    01-18-2015
    Location
    Tilburg
    MS-Off Ver
    2010
    Posts
    3

    VBA Filter combobox on userform with search suggestions

    Dear all,

    I have created an excel userform with some comboboxes, attached a document with the problem but stripped down to the basic problem.

    I figured out how i can filter/autoupdate my comboboxes and decrease the input list while i start typing in the list. However as soon as i select an item i get the following error: "Unable to get the CurrentRegion property of the Range class".

    Since i want to apply this feature to all comboboxes on my userforms i have put everything in a class event.

    I have already found some stuff online but these were basically comboboxes on a worksheet.

    Thank you very much!

    Best Regards, Marcel

    combobox_filter.xlsm



    Option Explicit
    
    Public WithEvents myCBox As msForms.ComboBox
    Dim data As Range
    
    Private Sub myCBox_Change()
        Set data = filter.Cells(1, 1).CurrentRegion
    '    filter.Activate
        With myCBox
           .DropDown
            
            ' FILTER
            list.Cells(1, 1).CurrentRegion.AutoFilter Field:=1, Criteria1:="*" & .Value & "*"
    
            ' COPY
            filter.Cells.Clear
            list.Cells(1, 1).CurrentRegion.Copy Destination:=filter.Cells(1, 1)
            
            Set data = filter.Cells(1, 1).CurrentRegion
            num_rows_2 = data.Rows.Count
            
            ' UPDATE COMBOBOX
            .RowSource = "filter!A2:A" & num_rows_2
    
        End With
    End Sub

  2. #2
    Registered User
    Join Date
    01-18-2015
    Location
    Tilburg
    MS-Off Ver
    2010
    Posts
    3

    Re: VBA Filter combobox on userform with search suggestions

    Dear all,

    Does anyone have any clue regarding this subject?

    Best Regards, Marcel

  3. #3
    Registered User
    Join Date
    01-18-2015
    Location
    Tilburg
    MS-Off Ver
    2010
    Posts
    3

    Re: VBA Filter combobox on userform with search suggestions

    Dear all,

    I still wasn't able to figure this out?

    Anyone a clue?

+ 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. [SOLVED] search suggestions in userform combobox list
    By hassan khansa in forum Excel Programming / VBA / Macros
    Replies: 33
    Last Post: 12-12-2015, 07:59 AM
  2. Using ComboBox on Userform to filter ListBox
    By burger160 in forum Excel Programming / VBA / Macros
    Replies: 3
    Last Post: 10-17-2014, 05:03 PM
  3. UserForm Combobox Wild Search Filter based on first letter entry
    By Excelnoub in forum Excel Programming / VBA / Macros
    Replies: 7
    Last Post: 06-23-2014, 08:17 AM
  4. using userform textbox to search instead of combobox
    By cfinch100 in forum Excel Programming / VBA / Macros
    Replies: 0
    Last Post: 09-01-2013, 02:06 PM
  5. Userform & ComboBox to search a Workbook
    By StevenM in forum Excel Programming / VBA / Macros
    Replies: 3
    Last Post: 03-06-2012, 03:01 AM
  6. Filter within a userform (combobox?)
    By jsmity in forum Excel Programming / VBA / Macros
    Replies: 0
    Last Post: 09-29-2011, 06:49 AM
  7. Userform: Make a advanced filter script "filter" when a combobox is altered
    By Zheno in forum Excel Programming / VBA / Macros
    Replies: 5
    Last Post: 01-09-2010, 04:06 AM

Tags for this Thread

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