Okay, I have a sheet that I print out a whole month at a time. I want it to print the Day, Date, Month, Year on each sheet for the month, in other words increment the date for each sheet printed.
I found a nice piece of code in another post. It allows me to type in the month at h1, and the year at h2, and then the macro prints out the sheets for that month.
But it prints the date in the footer. I would like the date printed at B5. How do I do that?
Sub dateinfooter()
Dim CopiesCount As Long
Dim CopieNumber As Integer
Dim N As Integer
Dim ws As Worksheet
Dim strName As String
Dim datepick As String
N = 1
strName = Range("h1").Value
datepick = Range("h2").Value
Select Case strName
Case "January", "March", "May", "June", "July", "August", "October", "December"
CopiesCount = 31
Case "April", "June", "September", "November"
CopiesCount = 30
Case "February 28"
CopiesCount = 28
Case "February 29"
CopiesCount = 29
Case Else
Exit Sub
End Select
For CopieNumber = 1 To CopiesCount
With ActiveSheet
.PageSetup.RightFooter = "&""Arial,Bold""&16DATE : " & strName & " " & N & " " & datepick
'.PrintOut preview:=True 'JUST FOR TESTING
.PrintOut 'Print the sheet
End With
N = N + 1
Next CopieNumber
'ActiveSheet.PageSetup.RightFooter = ""
End Sub
Bookmarks