ULFAH LINA
New Member
- Joined
- Sep 30, 2021
- Messages
- 1
- Office Version
- 2019
- Platform
- Windows
hi and thanks in advance,
I want a date for a specific row
I have the code. I'm using
Private Sub Worksheet_Change(ByVal Target As Range)
If Target.Column <> 7 Then Exit Sub
If Target.Cells.Count > 1 Then Exit Sub
With Target.Offset(0, 2)
.Value = Now
.NumberFormat = "DD/MM/YYYY hh:mm AM/PM"
End With
End Sub
it worked so well ONLY if I update this particular workbook
in column 7 I linked to another workbook (not in the same workbook for this code)
so usually when I update in other files, the number will correspond with this particular workbook, in column 7
but the date n time stamp for - With Target.Offset(0, 2) - code is not working. only works if I update this workbook myself but I don't want that.
please help me thanks
I want a date for a specific row
I have the code. I'm using
Private Sub Worksheet_Change(ByVal Target As Range)
If Target.Column <> 7 Then Exit Sub
If Target.Cells.Count > 1 Then Exit Sub
With Target.Offset(0, 2)
.Value = Now
.NumberFormat = "DD/MM/YYYY hh:mm AM/PM"
End With
End Sub
it worked so well ONLY if I update this particular workbook
in column 7 I linked to another workbook (not in the same workbook for this code)
so usually when I update in other files, the number will correspond with this particular workbook, in column 7
but the date n time stamp for - With Target.Offset(0, 2) - code is not working. only works if I update this workbook myself but I don't want that.
please help me thanks