Hallo Teresa
3 Wochen Rücklauf + Aktuelle
Sub EinAusblenden()
Dim DINKW As Integer
DINKW = DatePart("ww", Date, vbUseSystemDayOfWeek, vbUseSystem)
If DINKW > 4 Then
If ActiveSheet.Range(ActiveSheet.Cells(1, 3), ActiveSheet.Cells(1, 2 + DINKW - 4)).EntireColumn.Hidden = False Then
ActiveSheet.Range(ActiveSheet.Cells(1, 3), ActiveSheet.Cells(1, 2 + DINKW - 4)).EntireColumn.Hidden = True
Else
ActiveSheet.Range(ActiveSheet.Cells(1, 3), ActiveSheet.Cells(1, 2 + DINKW - 4)).EntireColumn.Hidden = False
End If
End If
End Sub
Gruß Michael
|