Hello,
I'm having a problem with an Auto Filtered Column trying to select Week Ending Dates which are Formatted in text as yyyymmdd. I want the sub procedure to have user select only a Start Date and an End Date for a monthly period.
I can get the inbox to perfom with both periods, but when the sub completes it is not selecting the inputted request. It clears the filter with no dates.
Here's what I have;
ActiveSheet.Range("$A$4:$Z$15920").AutoFilter Field:=4
Columns("D:D").Select
Selection.NumberFormat = "yyyymmdd;@"
ActiveSheet.Range("$A$4:$Z$15920").AutoFilter Field:=4, Criteria1:=">=" & DateValue(Application.InputBox("Please enter start date (in format yyyymmdd)", Type:=2)), _
Operator:=xlAnd, Criteria2:="<=" & DateValue(Application.InputBox("Please enter end date (in format yyyymmdd)", Type:=2)) + 1
ActiveSheet.Range("$A$4:$Z$15920").AutoFilter Field:=4
Any help would be apprecicated. Thanks
rcb3excel
I'm having a problem with an Auto Filtered Column trying to select Week Ending Dates which are Formatted in text as yyyymmdd. I want the sub procedure to have user select only a Start Date and an End Date for a monthly period.
I can get the inbox to perfom with both periods, but when the sub completes it is not selecting the inputted request. It clears the filter with no dates.
Here's what I have;
ActiveSheet.Range("$A$4:$Z$15920").AutoFilter Field:=4
Columns("D:D").Select
Selection.NumberFormat = "yyyymmdd;@"
ActiveSheet.Range("$A$4:$Z$15920").AutoFilter Field:=4, Criteria1:=">=" & DateValue(Application.InputBox("Please enter start date (in format yyyymmdd)", Type:=2)), _
Operator:=xlAnd, Criteria2:="<=" & DateValue(Application.InputBox("Please enter end date (in format yyyymmdd)", Type:=2)) + 1
ActiveSheet.Range("$A$4:$Z$15920").AutoFilter Field:=4
Any help would be apprecicated. Thanks
rcb3excel