Hi All
I have 2 textbox's that drive a custom filter. The user enters a particular date in each of the textbox's which then filter the worksheet. Is there a way they can enter the month as well so if they want a full month then they can input June and June rather than 01/06/2011 and 30/06/2011. Current code below
Thanks
Private Sub Insertcmdbutton_Click()
With Worksheets("Service Ticket Detail").Columns("A:M")
.AutoFilter
.AutoFilter Field:=9, Criteria1:=">=" & CLng(DateValue(FirstMonth.Value)), Operator:=xlAnd, Criteria2:="<=" & CLng(DateValue(LastMonth.Value))
If FaultCat.Value <> "ALL" Then
.AutoFilter Field:=3, Criteria1:="=" & FaultCat.Value
End If
End With
I have 2 textbox's that drive a custom filter. The user enters a particular date in each of the textbox's which then filter the worksheet. Is there a way they can enter the month as well so if they want a full month then they can input June and June rather than 01/06/2011 and 30/06/2011. Current code below
Thanks
Private Sub Insertcmdbutton_Click()
With Worksheets("Service Ticket Detail").Columns("A:M")
.AutoFilter
.AutoFilter Field:=9, Criteria1:=">=" & CLng(DateValue(FirstMonth.Value)), Operator:=xlAnd, Criteria2:="<=" & CLng(DateValue(LastMonth.Value))
If FaultCat.Value <> "ALL" Then
.AutoFilter Field:=3, Criteria1:="=" & FaultCat.Value
End If
End With