Hallo!
Ich habe einen Dienstplan für 2021.
Es gibt 2 Blätter "Jan-Jun" und "Jul-Dez". In der Zeile 6 sind alle Tage aufgelistet.
Bei Start der Excel Datei soll automatisch auf das heutige Datum gesprungen werden.
Wer kann mir da helfen?
Tobiax...
Private Sub Workbook_Open() Dim rngDatum As Range Select Case Month(Date) Case Is < 7 With Worksheets("Jan-Jun") Set rngDatum = Rows(6).Find(Date, lookat:=xlWhole, LookIn:=xlFormulas) If Not rngDatum Is Nothing Then Application.Goto rngDatum End With Case Else With Worksheets("Jul-Dez") Set rngDatum = Rows(6).Find(Date, lookat:=xlWhole, LookIn:=xlFormulas) If Not rngDatum Is Nothing Then Application.Goto rngDatum End With End Select End Sub
Private Sub Workbook_Open() Dim rngDatum As Range Select Case Month(Date) Case Is < 7 With Worksheets("Jan-Jun") Set rngDatum = .Rows(6).Find(Date, lookat:=xlWhole, LookIn:=xlFormulas) If Not rngDatum Is Nothing Then Application.Goto rngDatum, scroll:=True End With Case Else With Worksheets("Jul-Dez") Set rngDatum = .Rows(6).Find(Date, lookat:=xlWhole, LookIn:=xlFormulas) If Not rngDatum Is Nothing Then Application.Goto rngDatum, scroll:=True End With End Select End Sub