Hi Dave
Try this code
Sub datesinHeader()
Dim CopiesCount As Long
Dim CopieNumber As Integer
Dim N As Integer
N = 0
CopiesCount = Application.InputBox("How many days in month ?", Type:=1)
For CopieNumber = 1 To CopiesCount
With ActiveSheet
.PageSetup.RightHeader = "&""Arial,Bold""&16DATE : " & Format(DateAdd("d", N, Now), "dddd mmmm dd yyyy")
.PrintOut 'Print the sheet
End With
N = N + 1
Next CopieNumber
ActiveSheet.PageSetup.RightFooter = ""
'=IF(A1="","",TEXT(MATCH(LEFT(A1,2),{"Sa","Su","Mo","Tu","We","Th","Fr"},0),"dddd"))
End Sub
The lines of code I changed are underlined. This line
'=IF(A1="","",TEXT(MATCH(LEFT(A1,2),{"Sa","Su","Mo","Tu","We","Th","Fr"},0),"dddd"))
I didn't understand what you were trying to do so it's commented out. We can fix it it you tell me what you're trying to accomplish.
Let me know of issues.
John
Bookmarks