hi
vb code bybasses all of the built in niceities of excel such as multi levels
of undo.
so to have code and undo, you have to have more code to undo.
see this site.
http://spreadsheetpage.com/index.php...ba_subroutine/
regards
FSt1
" wrote:
Hello
I'am using this code to generete a time stamp in my excel sheet. But
the cude also makes it impossible to use the undo bottom. Do any of
you have a trick to both have timestamp and undo funktion?
Private Sub Worksheet_Change(ByVal Target As Excel.Range)
With Target
If .Count 1 Then Exit Sub
If Not Intersect(Range("A2:A10"), .Cells) Is Nothing Then
Application.EnableEvents = False
If IsEmpty(.Value) Then
.Offset(0, 1).ClearContents
Else
With .Offset(0, 1)
.NumberFormat = "dd mmm yyyy hh:mm:ss"
.Value = Now
End With
End If
Application.EnableEvents = True
End If
End With
End Sub