hello again,

ok i have the do problem fixed


Sub Kalender()
    Dim yr As Integer, WS As Worksheet, SDate As Date, wks As Integer, i As Integer, leap As String
    On Error Resume Next
    yr = InputBox(Prompt:="Please enter year", Default:=Year(Date))
    On Error GoTo 0
    If yr = 0 Then Exit Sub
    If Not IsDate(DateSerial(yr, 1, 1)) Then Exit Sub
    Application.ScreenUpdating = False
    SDate = DateSerial(yr, 1, 1)
    Worksheets("kalender").Range("b1").FormulaR1C1 = yr
    leap = Worksheets("kalender").Range("l6")
    If leap = "ja" Then GoTo schrikkel
    If Weekday(SDate) = 5 Then wks = 53 Else wks = 52
If Weekday(SDate) <= 5 Then GoTo doloop1 Else GoTo doloop2
doloop1:
    Do Until Weekday(SDate, vbMonday) = 1
    SDate = SDate - 1
Loop
    Range("A2:G2") = Array("Week nummer", "Start datum", "Eind datum", "Linker Voorwas", "Rechter Voorwas", "Hoofdwas 1", "Hoofdwas 2")
    Range("A3:C3") = Array(1, SDate, SDate + 6)
    For i = 2 To wks
        Range("A2:C2").Offset(i, 0) = Array(i, SDate + (7 * (i - 1)), SDate + (7 * (i - 1)) + 6)
    Next i
    If wks = 52 Then Range("a55:c55").Delete
    Application.ScreenUpdating = True
    GoTo einde
doloop2:
    Do Until Weekday(SDate, vbMonday) = 1
    SDate = SDate + 1
Loop
    Range("A2:G2") = Array("Week nummer", "Start datum", "Eind datum", "Linker Voorwas", "Rechter Voorwas", "Hoofdwas 1", "Hoofdwas 2")
    Range("A3:C3") = Array(1, SDate, SDate + 6)
    For i = 2 To wks
        Range("A2:C2").Offset(i, 0) = Array(i, SDate + (7 * (i - 1)), SDate + (7 * (i - 1)) + 6)
    Next i
    If wks = 52 Then Range("a55:c55").Delete
    Application.ScreenUpdating = True
    GoTo einde
schrikkel:
    If Weekday(SDate) = 5 Or Weekday(SDate) = 4 Then wks = 53 Else wks = 52
    If Weekday(SDate) <= 5 Then GoTo doloop3 Else GoTo doloop4
doloop3:
Do Until Weekday(SDate, vbMonday) = 1
    SDate = SDate - 1
Loop
    Range("A2:G2") = Array("Week nummer", "Start datum", "Eind datum", "Linker Voorwas", "Rechter Voorwas", "Hoofdwas 1", "Hoofdwas 2")
    Range("A3:C3") = Array(1, SDate, SDate + 6)
    For i = 2 To wks
        Range("A2:C2").Offset(i, 0) = Array(i, SDate + (7 * (i - 1)), SDate + (7 * (i - 1)) + 6)
    Next i
    If wks = 52 Then Range("a55:c55").Delete
    Application.ScreenUpdating = True
    GoTo einde
doloop4:
    Do Until Weekday(SDate, vbMonday) = 1
    SDate = SDate + 1
Loop
    Range("A2:G2") = Array("Week nummer", "Start datum", "Eind datum", "Linker Voorwas", "Rechter Voorwas", "Hoofdwas 1", "Hoofdwas 2")
    Range("A3:C3") = Array(1, SDate, SDate + 6)
    For i = 2 To wks
        Range("A2:C2").Offset(i, 0) = Array(i, SDate + (7 * (i - 1)), SDate + (7 * (i - 1)) + 6)
    Next i
    If wks = 52 Then Range("a55:c55").Delete
    Application.ScreenUpdating = True
    GoTo einde
einde:
End Sub

problem is that when you once had a year with 53 weeks the 53rd week stays there when you change the year, I am working on this now, but it might be a usual piece of code if the leap-year business is implemented in the VBA and not on the sheet as it is now. (*edit*) fixed the 53rd week by adding the delete line (*/edit*)