New Date on each new page

P

phoneguy

I would like to print a page for each day for the upcoming year. 365 pages.
I want to print all of them now.
On each page I need the date for that day. What should I use for this? Pivot
tables??

Thanks!
Jim
 
R

Ron de Bruin

Hi Jim

Enter the first day in A1 before you run the macro
If it is working correct change PrintPreview to PrintOut

This example will not print the sunday's

Untested

Sub PrintCopies_ActiveSheet()
Dim yr As Integer
yr = Year(Range("a1").Value)
Do While Year(Range("a1").Value) = yr
If Application.WorksheetFunction. _
Weekday(Range("a1").Value) <> 1 Then
ActiveSheet.PrintPreview
End If
Range("a1").Value = Range("a1").Value + 1
Loop
End Sub
 
P

phoneguy

Thank you. It worked very well.

Jim

Ron de Bruin said:
Hi Jim

Enter the first day in A1 before you run the macro
If it is working correct change PrintPreview to PrintOut

This example will not print the sunday's

Untested

Sub PrintCopies_ActiveSheet()
Dim yr As Integer
yr = Year(Range("a1").Value)
Do While Year(Range("a1").Value) = yr
If Application.WorksheetFunction. _
Weekday(Range("a1").Value) <> 1 Then
ActiveSheet.PrintPreview
End If
Range("a1").Value = Range("a1").Value + 1
Loop
End Sub
 
Top