Sub Printen_Beiden_A3()
ActiveWorkbook.Unprotect "paswoord"
With Application
.EnableEvents = False
.DisplayAlerts = False
End With
naam = ActiveSheet.Name
ActiveSheet.Copy After:=Sheets(Sheets.Count)
ActiveSheet.Cells(3, 2).Select
If ActiveSheet.Cells(3, 2).Value Mod 2 = 0 Then
'Print Sheet1 exactly one page wide and tall
With ActiveSheet().PageSetup
.Zoom = False
.FitToPagesTall = 1
.FitToPagesWide = 1
ActiveSheet.PageSetup.CenterVertically = True
ActiveSheet.PageSetup.CenterHorizontally = True
ActiveSheet.PageSetup.CenterHeader = "&""Calibri,bold""&30" & "WEEK " & Cells(3, 2)
ActiveSheet.PageSetup.CenterFooter = "&""Calibri""&20" & "Technische Dienst Assenfabriek "
ActiveSheet.PageSetup.PaperSize = xlPaperA3
ActiveSheet.PageSetup.Orientation = xlLandscape
End With
With Range("A13:AB74")
.SpecialCells(4).Interior.Color = xlNone
.PrintOut , Copies:=1
End With
ActiveSheet.Delete
Sheets(naam).Select
With Application
.EnableEvents = True
.DisplayAlerts = True
End With
End If
If ActiveSheet.Cells(3, 2).Value Mod 2 <> 0 Then
'Print Sheet1 exactly one page wide and tall
With ActiveSheet().PageSetup
.Zoom = False
.FitToPagesTall = 1
.FitToPagesWide = 1
ActiveSheet.PageSetup.CenterVertically = True
ActiveSheet.PageSetup.CenterHorizontally = True
ActiveSheet.PageSetup.CenterHeader = "&""Calibri,bold""&30" & "WEEK " & Cells(3, 2)
ActiveSheet.PageSetup.CenterFooter = "&""Calibri""&20" & "Technische Dienst Assenfabriek "
ActiveSheet.PageSetup.PaperSize = xlPaperA3
ActiveSheet.PageSetup.Orientation = xlLandscape
End With
With Range("A14:AB75")
.SpecialCells(4).Interior.Color = xlNone
.PrintOut , Copies:=1
End With
ActiveSheet.Delete
Sheets(naam).Select
With Application
.EnableEvents = True
.DisplayAlerts = True
End With
End If
ActiveWorkbook.Protect "paswoord"
End Sub