Hier hast Du ein Kalendermakro zum Probieren.
Dazu schreibst Du in Zelle A1 die Jahreszahl (2002) und führst das Makro aus. Da werden auch Zellen eingefärbt. Das mußt Du dann auf Dein Problem umsetzen.
Option Explicit
Sub KalenderEinfügen()
Dim Z, S, Year, Month, Day
Year = ActiveCell
If Not IsDate("1.1." & Year) Then End
If Year 2078 Then End
Z = ActiveCell.Row
S = ActiveCell.Column
'Formatierungen und Ausgangswerte
Range(Cells(Z, S + 1), Cells(Z, S + 12)).NumberFormat = "MMM"
Range(Cells(Z, S + 1), Cells(Z, S + 12)).HorizontalAlignment = xlCenter
Range(Cells(Z + 1, S), Cells(Z + 31, S)).NumberFormat = "0""."""
Range(Cells(Z + 1, S), Cells(Z + 31, S + 12)).HorizontalAlignment = xlLeft
Range(Cells(Z + 1, S + 1), Cells(Z + 31, S + 12)).NumberFormat = "TTT"
Range(Cells(Z, S), Cells(Z + 31, S + 12)).Borders.Color = RGB(0, 0, 0)
Range(Cells(Z, S), Cells(Z + 31, S + 12)).Interior.Color = RGB(255, 255, 255)
Range(Cells(Z + 1, S), Cells(Z + 31, S + 12)).Formula = ""
'Felder ausfüllen
For Month = 1 To 12
Cells(Z, S + Month) = CDate(1 & "." & Month & "." & Year)
For Day = 1 To 31
Cells(Z + Day, S) = Day
If IsDate(Day & "." & Month & "." & Year) Then
Cells(Z + Day, S + Month) = CDate(Day & "." & Month & "." & Year)
If WeekDay(Cells(Z + Day, S + Month)) = 1 Then
Cells(Z + Day, S + Month).Interior.Color = RGB(196, 196, 196)
ElseIf WeekDay(Cells(Z + Day, S + Month)) = 7 Then
Cells(Z + Day, S + Month).Interior.Color = RGB(224, 224, 224)
End If
End If
Next
Next
End Sub