Here is what I have:
Expand|Select|Wrap|Line Numbers
- ActiveSheet.Range("$A$1:$BU$87").AutoFilter Field:=17, Criteria1:="="
- ActiveSheet.Range("$A$1:$BU$87").AutoFilter Field:=1, Criteria1:="="
- If ActiveSheet.AutoFilter.Range.Columns(2).SpecialCells(xlCellTypeVisible).Cells.Count - 1 > 1 Then
- Yprint = MsgBox("There are new patients to enroll. Do you want to print today's list?", vbYesNo + vbQuestion, "Print")
- If Yprint = vbYes Then
- ActiveWindow.SelectedSheets.PrintOut Copies:=1, Collate:=True, IgnorePrintAreas:=False
- End If
- Else: MsgBox ("No new patients today")
- End If