That worked great. If I want to do the same thing to columns F, I and L can
I use the "or" and copy and this statement "Application.Intersect(Target,
Columns("B:B"))"? Thanks so much!!
Try this one.
Private Sub Worksheet_Change(ByVal Target As Range)
On Error GoTo ws_exit:
If Intersect(Range(Target(1).Address), _
Range("B:B, F:F, I:I, L:L")) Is Nothing Then Exit Sub
Application.EnableEvents = False
Target.Offset(0, 1).Value = Now()
ws_exit:
Application.EnableEvents = True
End Sub
Gord
>That worked great. If I want to do the same thing to columns F, I and L can
>I use the "or" and copy and this statement "Application.Intersect(Target,
[quoted text clipped - 30 lines]
>> >a field but will not update when the spreadsheet is opened tomorrow. Can
>> >anybody help me with this? Thanks!
Gord Dibben - 12 Feb 2007 18:43 GMT
This version may be better.
Checks for blank cells.
Private Sub Worksheet_Change(ByVal Target As Range)
On Error GoTo ws_exit:
If Intersect(Range(Target(1).Address), _
Range("B:B, F:F, I:I, L:L")) Is Nothing Then Exit Sub
Application.EnableEvents = False
If Target.Value <> "" Then
Target.Offset(0, 1).Value = Now()
End If
ws_exit:
Application.EnableEvents = True
End Sub
Gord
>Try this one.
>
[quoted text clipped - 44 lines]
>>> >a field but will not update when the spreadsheet is opened tomorrow. Can
>>> >anybody help me with this? Thanks!