I was needing a method to automatically update a date field when I adjusted my worksheet row.
This is what I ended up with. Change ? to what column you want to track updates on.
Private Sub Worksheet_Change(ByVal Target As Range)
If Target.Cells.Count = 1 And Target.Cells.Column = ? Then
Target(1, 2) = Date
Target(1, 2).EntireColumn.AutoFit
End If
End Sub |
Private Sub Worksheet_Change(ByVal Target As Range)
If Target.Cells.Count = 1 And Target.Cells.Column = ? Then
Target(1, 2) = Date
Target(1, 2).EntireColumn.AutoFit
End If
End Sub
This entry was posted
on Monday, February 3rd, 2014 at 2:44 pm and is filed under Uncategorized.
You can follow any responses to this entry through the RSS 2.0 feed.
You can leave a response, or trackback from your own site.