Anda di halaman 1dari 1

EXCEL DATA VALIDATION

Dim PreviousValue Private Sub Worksheet_Change(ByVal Target As Range) If Target.Value <> PreviousValue Then Sheets("log").Cells(65000, 1).End(xlUp).Offset(1, 0).Value = _ Format(Now, "dd mmm yyyy at hh:mm:ss") & " - " & Application.UserName & " changed cell " & Target.Address _ & " from " & PreviousValue & " to " & Target.Value End If End Sub Private Sub Worksheet_SelectionChange(ByVal Target As Range) PreviousValue = Target.Value End Sub Private Sub App_NewWorkbook(ByVal Wb As Workbook) Application.Windows.Arrange xlArrangeStyleCascade End Sub

Dim PreviousValue Private Sub Worksheet_Change(ByVal Target As Range) If Target.Value <> PreviousValue Then Sheets("DC_log").Cells(65000, 1).End(xlUp).Offset(1, 0).Value = Format(Now, "dd mmm yyyy at hh:mm:ss") & " - " & Application.UserName & " changed cell " & Target.Address _ & " from " & PreviousValue & " to " & Target.Value End If End Sub Private Sub Worksheet_SelectionChange(ByVal Target As Range) PreviousValue = Target.Value End Sub

Anda mungkin juga menyukai