VBA-Code läßt Excel 2021 abstürzen, in 2016 jedoch O.K.
27.12.2023 15:43:30
Ecki#1
Unter Excel 2016 tritt dieses Problem jedoch nicht auf, da funktioniert der Code einwandfrei.
Private Sub Worksheet_Activate()
Range("L25").Select
ActiveWindow.LargeScroll ToRight:=-1
ActiveWindow.LargeScroll Down:=-1
End Sub
Private Sub Worksheet_Change(ByVal Target As Range)
If Target.Address = "$AA$1" Then Exit Sub
Range("V23") = "letztes Update: " & _
Application.UserName & _
", " & _
Format(Date, "dd.mm.yy") & ", " & Format(Time, "hh:mm")
End Sub
Durch den 1. Teil wird zunächst in der Tabelle die Zelle L25 aufgewählt.
Durch den 2. Teil soll nach Eintrag eines "n" oder "j" in eine der Zellen der Tabelle mit 11 Zeilen und 22 Spalten, das entsprechende Datum und die jeweilige Uhrzeit an Position "V23" festgehalten werden. Im Moment, wo in einer Zelle ein "n" oder "j" bestätigt wird, stürzt Excel ab.
Was macht also Excel 2021 anders als Excel 2016 und wie läßt sich das Problem beheben?