• Hi All

    Please note that at the Chandoo.org Forums there is Zero Tolerance to Spam

    Post Spam and you Will Be Deleted as a User

    Hui...

  • When starting a new post, to receive a quicker and more targeted answer, Please include a sample file in the initial post.

checking the combobox value to filter data

ivandgreat

New Member
good day..
i have code to filter the listbox from the value on the combo box..
But am i receiving error "unable to get the match property of the worksheetfunction class"

<<< use code - tags >>>
Code:
Sub Refresh_Listbox()

Dim sh As Worksheet
Set sh = ThisWorkbook.Sheets("Data")

Dim dsh As Worksheet
Set dsh = ThisWorkbook.Sheets("Data_Display")

''''''''''' Copy Data ''''''''''
dsh.Cells.Clear
sh.AutoFilterMode = False


If Me.cmbFilterBy.Value <> "ALL" Then
    sh.UsedRange.AutoFilter Application.WorksheetFunction.Match(Me.cmbFilterBy.Value, sh.Range("1:1"), 0), "*" & Me.txtSearch.Value & "*"
End If

End Sub
 
Last edited by a moderator:
Back
Top