Hello. Me and a co-worker are working on a table for issues in the office outsourced for repair. We'd like to filter data, for a report, by the opened date of last month. The opened date field format is mm/dd/yy and it's column E(5). Its intended for a macro to run at a click of a button. From other marcos we've made for this table, here's an example of what we have so far:
Sub LastMonthReportPreview()
'
' LastMonthReportPreview Macro
'
Application.ScreenUpdating = False
Sheets("Issues Table").Select
Selection.Filter field:=5, Criteria1:=
With ActiveSheet.PageSetup
.LeftHeader = "&18Monthly Issues:&10 Print Date: &""Arial,Bold""&D" & Chr(10) & " "
End With
ActiveWindow.SelectedSheets.PrintPreview
Selection.AutoFilter field:=5
Sheets("Reports").Select
End Sub
The red line is where we're stumped. We don't know how to filter it properly. Could someone lend a hand with this?
Thanks in advance.
Sub LastMonthReportPreview()
'
' LastMonthReportPreview Macro
'
Application.ScreenUpdating = False
Sheets("Issues Table").Select
Selection.Filter field:=5, Criteria1:=
With ActiveSheet.PageSetup
.LeftHeader = "&18Monthly Issues:&10 Print Date: &""Arial,Bold""&D" & Chr(10) & " "
End With
ActiveWindow.SelectedSheets.PrintPreview
Selection.AutoFilter field:=5
Sheets("Reports").Select
End Sub
The red line is where we're stumped. We don't know how to filter it properly. Could someone lend a hand with this?
Thanks in advance.