Sub Print_Sheet()
'Begins Error Handling Code
On Error GoTo Helper
Dim Mail As String
Dim name As String
name = Sheets("Notes").Range("N4")
ActiveSheet.PageSetup.PrintArea = "$A$1:$O$55"
Application.PrintCommunication = False
With ActiveSheet.PageSetup
.PrintTitleRows = ""
.PrintTitleColumns = ""
End With
Application.PrintCommunication = True
ActiveSheet.PageSetup.PrintArea = "$A$1:$O$55"
Application.PrintCommunication = False
With ActiveSheet.PageSetup
.LeftHeader = ""
.CenterHeader = ""
.RightHeader = ""
.LeftFooter = ""
.CenterFooter = ""
.RightFooter = ""
.LeftMargin = Application.InchesToPoints(0.7)
.RightMargin = Application.InchesToPoints(0.7)
.TopMargin = Application.InchesToPoints(0.75)
.BottomMargin = Application.InchesToPoints(0.75)
.HeaderMargin = Application.InchesToPoints(0.3)
.FooterMargin = Application.InchesToPoints(0.3)
.PrintHeadings = False
.PrintGridlines = False
.PrintComments = xlPrintNoComments
.PrintQuality = 600
.CenterHorizontally = False
.CenterVertically = False
.Orientation = xlPortrait
.Draft = False
.PaperSize = xlPaperLetter
.FirstPageNumber = xlAutomatic
.Order = xlDownThenOver
.BlackAndWhite = False
.Zoom = False
.FitToPagesWide = 1
.FitToPagesTall = 1
.PrintErrors = xlPrintErrorsDisplayed
.OddAndEvenPagesHeaderFooter = False
.DifferentFirstPageHeaderFooter = False
.ScaleWithDocHeaderFooter = True
.AlignMarginsHeaderFooter = True
.EvenPage.LeftHeader.Text = ""
.EvenPage.CenterHeader.Text = ""
.EvenPage.RightHeader.Text = ""
.EvenPage.LeftFooter.Text = ""
.EvenPage.CenterFooter.Text = ""
.EvenPage.RightFooter.Text = ""
.FirstPage.LeftHeader.Text = ""
.FirstPage.CenterHeader.Text = ""
.FirstPage.RightHeader.Text = ""
.FirstPage.LeftFooter.Text = ""
.FirstPage.CenterFooter.Text = ""
.FirstPage.RightFooter.Text = ""
End With
Application.PrintCommunication = True
'ActiveSheet.PrintOut
If Sheets("Notes").Range("M30").Value = "Yes" Then
Call Printer
End If
If Sheets("Developer").Range("D10").Value = "Yes" Then Call Email_Active_Sheet
If Sheets("Notes").Range("D12").Value = "Yes" Then Call EmailActiveMaster
If Sheets("Developer").Range("B12").Value = "Yes" Then Call EmailActiveEngineers
If Sheets("Developer").Range("D10").Value = "Yes" Then GoTo Mail
If Sheets("Developer").Range("D12").Value = "Yes" Then GoTo Mail
If Sheets("Developer").Range("B12").Value = "Yes" Then GoTo Mail
Exit Sub
Mail:
MsgBox "The form has been emailed and should be coming out of the printer momentarily.", vbOKOnly, name
'Error Clearing Code
Exit Sub
Helper:
resp = MsgBox("We're sorry to see you've encountered an error." & vbCrLf & vbCrLf & "To proceed, we recommend you contact the Developer " & _
"with error codes [1144] and " & "[" & Err.Number & "-" & Err.Description & "]." & vbCrLf & vbCrLf & "To attempt to patch your problem at least " & _
"temporarily, we recommend you click [Yes] to see help directions. Would you like to continue?", vbYesNoCancel, name)
If resp = vbYes Then
Call Error_Handle(sProcName, Err.Number, Err.Description)
ElseIf resp = vbNo Then
Exit Sub
ElseIf resp = vbCancel Then
Exit Sub
End If
End Sub