Private Sub btnFilter_Click()
Dim startDate As String
Dim shift As String
'reads date from the userform
startDate = tbstartdate.Value 'tbStartDate is the name of the textbox for Starting Date
shift = tbshift 'tbshift is the name of the textbox for shift
Application.DisplayAlerts = False
'FILTERS
With Worksheets("sheet1")
.AutoFilterMode = False
.Range("a1:p1").AutoFilter
.Range("a1:p1").AutoFilter Field:=2, Criteria1:=shift
.Range("a1:p1").AutoFilter Field:=1, Criteria1:=(">=" & startDate), _
Operator:=xlAnd, Criteria2:=("<=" & startDate)
UserForm1.Hide
Range("A1:P" & Cells(Rows.Count, "A").End(xlUp).Row).Copy
End With