Hi
I have the following code that is almost working but not quite. After i have input my parameters it seems to have filtered ok but it shows no data. When i look at what has been filtered the date shows in its number format but im not sure if this is whats causing the issue
can anyone help
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:=13, Criteria1:="=" & FaultCat.Value
End If
End With
End Sub
I have the following code that is almost working but not quite. After i have input my parameters it seems to have filtered ok but it shows no data. When i look at what has been filtered the date shows in its number format but im not sure if this is whats causing the issue
can anyone help
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:=13, Criteria1:="=" & FaultCat.Value
End If
End With
End Sub