I am using the below vba code to filter a spreadsheet on open to show the current month and all future dates and I can't for the life of me get it to show null values... where the date isn't populated. Any help would be appreciated!
Private Sub Workbook_Open() Sheets("Sheet1").Select 'startdate as date Dim startDate As Date 'startdate as long for excel Dim lstartDate As Long 'get start date, day = always 1 startDate = DateSerial(Year(Now), Month(Now), 1) lstartDate = startDate 'filter everything before current month 'you see this month + future ActiveSheet.Range("A1").AutoFilter Field:=6, Criteria1:=">=" & lstartDate End Sub



Reply With Quote
