I have a macro to set up print ranges (there are multiple ranges on each tab) Another macro calls the print range macro and then prints. My header references cell J1, which is a named range, and J2, which is =now() It does not print when I run the second macro.
code to set up print range
Sub PrintCorpCap()
Application.PrintCommunication = False
With Sheet164.PageSetup
.PrintTitleRows = ""
.PrintTitleColumns = "$a:$c"
.PrintArea = "$D$1:$e$49"
.RightHeader = Range("J1").Value & Chr(13) & Range("J2").Value
.RightFooter = "&G"
.Orientation = xlPortrait
.BlackAndWhite = True
.Zoom = 90
End With
Application.PrintCommunication = True
End Sub
/code
code to print out page
Private Sub USFPrintButton_Click()
Application.CalculateFull
Application.ScreenUpdating = False
If chk1.Value = True Then
Call PrintCorpCap
Sheet164.PrintOut
End If
~ Application.ScreenUpdating = True
End Sub
/code
If I run the first macro and print manually, the header is there. When I use the second macro to print, the header is not there. Any ideas what I'm doing wrong?
code to set up print range
Sub PrintCorpCap()
Application.PrintCommunication = False
With Sheet164.PageSetup
.PrintTitleRows = ""
.PrintTitleColumns = "$a:$c"
.PrintArea = "$D$1:$e$49"
.RightHeader = Range("J1").Value & Chr(13) & Range("J2").Value
.RightFooter = "&G"
.Orientation = xlPortrait
.BlackAndWhite = True
.Zoom = 90
End With
Application.PrintCommunication = True
End Sub
/code
code to print out page
Private Sub USFPrintButton_Click()
Application.CalculateFull
Application.ScreenUpdating = False
If chk1.Value = True Then
Call PrintCorpCap
Sheet164.PrintOut
End If
~ Application.ScreenUpdating = True
End Sub
/code
If I run the first macro and print manually, the header is there. When I use the second macro to print, the header is not there. Any ideas what I'm doing wrong?