Function IsZZFdag(Datum As Date) As Boolean
Dim Jaar As Integer
Dim TDag As String
Dim Pa1 As Date
IsZZFdag = False
'Controleren of de datum een zaterdag of een zondag is
If DatePart("w", Datum) = 1 Or _
DatePart("w", Datum) = 7 Then
IsZZFdag = True
GoTo Einde
End If
'Controleren op feestdagen met een vaste datum
TDag = Format(Datum, "dd-mm")
If TDag = "01-01" Then
IsZZFdag = True
GoTo Einde
End If
If TDag = "30-04" Then
IsZZFdag = True
GoTo Einde
End If
If TDag = "05-05" Then
IsZZFdag = True
GoTo Einde
End If
If TDag = "25-12" Then
IsZZFdag = True
GoTo Einde
End If
If TDag = "26-12" Then
IsZZFdag = True
GoTo Einde
End If
'Bepalen eerste paasdag
Jaar = DatePart("yyyy", Datum)
Pa1 = Pasen(Jaar)
'Controle goede vrijdag
If (Datum = Pa1 - 2) Then
IsZZFdag = True
GoTo Einde
End If
'Controle tweede paasdag
If (Datum = Pa1 + 1) Then
IsZZFdag = True
GoTo Einde
End If
'Controle hemelvaartdag
If (Datum = Pa1 + 39) Then
IsZZFdag = True
GoTo Einde
End If
'Controle tweede pinksterdag
If (Datum = Pa1 + 50) Then
IsZZFdag = True
GoTo Einde
End If
Einde:
End Function