Dim
arr
As
Variant
, NoCalculation
As
Boolean
Private
Sub
Workbook_Open()
Dim
lastzei
As
Long
lastzei = Cells(Rows.Count, Range(
"AB14"
).Column).
End
(xlUp).Row
arr = Range(
"AB14:AB"
& lastzei)
End
Sub
Private
Sub
Workbook_BeforeSave(
ByVal
SaveAsUI
As
Boolean
, Cancel
As
Boolean
)
On
Error
GoTo
Fehler
Dim
lastzei
As
Long
lastzei = Cells(Rows.Count, Range(
"AB14"
).Column).
End
(xlUp).Row
With
Range(
"AB14:AB"
& lastzei)
For
i = 1
To
.Cells.Count
NoCalculation =
True
If
i > UBound(arr)
Then
.Cells(i).Offset(0, 4).Value =
Date
ElseIf
.Cells(i) <> arr(i, 1)
Then
.Cells(i).Offset(0, 4).Value =
Date
End
If
NoCalculation =
False
Next
i
End
With
Workbook_Open
Exit
Sub
Fehler:
Workbook_Open
Resume
End
Sub
Private
Sub
Workbook_SheetCalculate(
ByVal
Sh
As
Object
)
If
NoCalculation =
False
Then
Workbook_BeforeSave
False
,
True
End
If
End
Sub