von xmerlin » Do, 25.01.2007 18:02
Hier ist der Code wie er in Excel funktioniert ....
Wenn sich in H1:H205,K1:K205 etwas ändert wird das Datum in D geschrieben.
Option Explicit
Private Sub Worksheet_Change(ByVal Target As Range)
Const Datum_Spalte = 4
Dim ber As Range, z As Range
Set ber = Intersect(Target, Me.UsedRange, Range("H1:H205,K1:K205"))
If Not ber Is Nothing Then
Application.EnableEvents = False
For Each z In ber
Cells(z.Row, Datum_Spalte) = Date
Next z
Application.EnableEvents = True
End If
End Sub
Hier ist der Code wie er in Excel funktioniert ....
Wenn sich in H1:H205,K1:K205 etwas ändert wird das Datum in D geschrieben.
Option Explicit
Private Sub Worksheet_Change(ByVal Target As Range)
Const Datum_Spalte = 4
Dim ber As Range, z As Range
Set ber = Intersect(Target, Me.UsedRange, Range("H1:H205,K1:K205"))
If Not ber Is Nothing Then
Application.EnableEvents = False
For Each z In ber
Cells(z.Row, Datum_Spalte) = Date
Next z
Application.EnableEvents = True
End If
End Sub