Hi all,

I'm trying to make a userform that will use an autofilter to show up a person with the dates choosen in date from to date to.
So this will be 3 comboboxes. 1 for the person name, 2 for the date from and 3 for the date to. So if some one wants to see for Peter 01/10/2013 till 05/10/2013, it will show only those records in the excel sheet.
The next plan would be to fill in those records (from column H) with the selection from the 4th combobox.
Could be that I want to mark for peter that he is on a sick leave from the 05/10/2013 till 12/10/2013
Combobox1= Peter Him, Combobox2= 05/10/2013, Combobox3= 12/10/2013, Combobox4= Sick Leave

I did this macro below for the autofilter, but I have no clue how to implement this with a userform.
Sub SelectionFilter()

    Rows("1:1").Select
    Selection.AutoFilter
    Selection.AutoFilter Field:=7, Criteria1:="Peter Him"
    Selection.AutoFilter Field:=1, Criteria1:=">=05/10/2013", Operator:=xlAnd, Criteria2:="<=07/10/2013"
End Sub
Any help would be great :-)

Greetings.