Sub AFDRUKINDELING()
With Sheets("INDELING")
.PageSetup.PrintArea = .Rows(2).Find(Date).Resize(50, 14).Address
.PageSetup.PrintArea = .Rows(2).Find(Format(Date, "dd-mm-yyyy")).Resize(50, 14).Address
.PageSetup.PrintArea = .Rows(2).Find(CDbl(Date)).Resize(50, 14).Address
End With
End Sub
Private Sub Workbook_BeforeClose(Cancel As Boolean)
ActiveSheet.Protect DrawingObjects:=True, Contents:=True, Scenarios:=True, Password:="*****"
ActiveSheet.EnableSelection = xlNoSelection
Sheets("GEGEVENS").Select
ActiveSheet.Protect DrawingObjects:=True, Contents:=True, Scenarios:=True, Password:="*****"
ActiveSheet.EnableSelection = xlNoSelection
Sheets("ADRESSEN").Select
ActiveSheet.Protect DrawingObjects:=True, Contents:=True, Scenarios:=True, Password:="*****"
ActiveSheet.EnableSelection = xlNoSelection
Sheets("VAKANTIEROOSTER").Select
ActiveSheet.Protect DrawingObjects:=True, Contents:=True, Scenarios:=True, Password:="*****"
ActiveSheet.EnableSelection = xlNoSelection
Sheets("ATR CORRECTIE").Select
ActiveSheet.Protect DrawingObjects:=True, Contents:=True, Scenarios:=True, Password:="*****"
ActiveSheet.EnableSelection = xlNoSelection
Sheets("MAANDRAPPORTAGE").Select
ActiveSheet.Protect DrawingObjects:=True, Contents:=True, Scenarios:=True, Password:="*****"
ActiveSheet.EnableSelection = xlNoSelection
Sheets("INDELING").Select
ActiveSheet.Protect DrawingObjects:=True, Contents:=True, Scenarios:=True, Password:="*****"
ActiveSheet.EnableSelection = xlNoSelection
Sheets("HOOFDMENU").Select
With ThisWorkbook
If Not .Saved Then
.Save
End If
End With
With Application
If .Workbooks.Count = 1 Then
.Quit
End If
End With
End Sub