I have a workbook with about 40 sheets that autopopulates with data (times, activities, etc.) from a second workbook. I added a macro to the first workbook to print only those sheets that contain a date in cell B3. However, when I run the macro it still prints the sheets with no date in B3 along with the rest of the sheets. Here is the printing macro for the first workbook:
Sub PrintCompleted()
Dim notes As Worksheet
For Each notes In ActiveWorkbook.Worksheets
If Not IsEmpty(notes.Range("B3")) Then
notes.PrintOut
End If
Next
End Sub
The cell B3 in each sheet contains some variation on the following formula to conditionally pull the date from the second workbook:
=IF(K40="","",'C:\Users\thisUser\Notes\[Activities_Attendence.xlsx]W110'!$I$1)
I'd appreciate any help with sorting out why the macro doesn't function as expected. Thanks!
Bookmarks