Dim
arr
As
Variant
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
)
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
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
Next
i
End
With
End
Sub