I am having trouble with my auto filter displaying the dates. The column format is set for date mm/dd/yyyy with vb coding
Columns("O:O").Select
Selection.NumberFormat = "mm/dd/yyyy"
My form date selectors are
Private Sub DTPicker1_CallbackKeyDown(ByVal KeyCode As Integer, ByVal Shift As Integer, ByVal CallbackField As String, CallbackDate As Date)
DTPicker1.CustomFormat = "mm/dd/yyyy"
End Sub
Private Sub DTPicker2_CallbackKeyDown(ByVal KeyCode As Integer, ByVal Shift As Integer, ByVal CallbackField As String, CallbackDate As Date)
DTPicker2.CustomFormat = "mm/dd/yyyy"
End Sub
And my auto filter is
ActiveSheet.ListObjects("Table_Query_from_TMS_ODBC").Range.AutoFilter Field:= _
15, Criteria1:=">=" & DTPicker1, Operator:=xlAnd, Criteria2:="<=" & DTPicker2
My auto filter will run, but will not filter the dates. Is this a date format issue between excel and visual basic?
Columns("O:O").Select
Selection.NumberFormat = "mm/dd/yyyy"
My form date selectors are
Private Sub DTPicker1_CallbackKeyDown(ByVal KeyCode As Integer, ByVal Shift As Integer, ByVal CallbackField As String, CallbackDate As Date)
DTPicker1.CustomFormat = "mm/dd/yyyy"
End Sub
Private Sub DTPicker2_CallbackKeyDown(ByVal KeyCode As Integer, ByVal Shift As Integer, ByVal CallbackField As String, CallbackDate As Date)
DTPicker2.CustomFormat = "mm/dd/yyyy"
End Sub
And my auto filter is
ActiveSheet.ListObjects("Table_Query_from_TMS_ODBC").Range.AutoFilter Field:= _
15, Criteria1:=">=" & DTPicker1, Operator:=xlAnd, Criteria2:="<=" & DTPicker2
My auto filter will run, but will not filter the dates. Is this a date format issue between excel and visual basic?