time stamp question

G

Gary''s Student

Just change the default value of the offset column variable. For example:

Instead of:
Optional ByVal ColOffset As Long = 1&, _
use:
Optional ByVal ColOffset As Long = 2&, _
 
R

Rodrigo

This is the rule that i am using. I do not see the Optional ByVal ColOffset
As Long = 1&.

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
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Similar Threads

Send Time Stamp by email 2
Time stamp 3
Date Stamp 7
separating date and time 5
Date Stamp by User and cell value 8
Time Stamp 8
Entering a time into excel 10
Insert name and adress from a list in a word document 1

Top