Hallo Teresa
Oder als Allgemeines Modul z.b. für einen Button, in Wechselwirkung
Sub EinAusblenden()
Dim DINKW As Integer
DINKW = DatePart("ww", Date, vbUseSystemDayOfWeek, vbUseSystem)
If DINKW > 1 Then
If ActiveSheet.Range(ActiveSheet.Cells(1, 3), ActiveSheet.Cells(1, 2 + DINKW - 1)).EntireColumn.Hidden = False Then
ActiveSheet.Range(ActiveSheet.Cells(1, 3), ActiveSheet.Cells(1, 2 + DINKW - 1)).EntireColumn.Hidden = True
Else
ActiveSheet.Range(ActiveSheet.Cells(1, 3), ActiveSheet.Cells(1, 2 + DINKW - 1)).EntireColumn.Hidden = False
End If
End If
End Sub
Gruß Michael
|