I'm trying to help Gunther with this post
http://www.excelforum.com/excel-gene...g-as-such.html
but my code loops around a second time giving an error. How do I prevent this?
Private Sub Worksheet_Change(ByVal Target As Range)
Dim NewYear As Integer, NewMonth As Integer
If Not Intersect(Target, Range("B:B")) Is Nothing Then
NewYear = "20" & Day(Target)
NewMonth = Month(Target)
Target.Value = DateValue(NewMonth & "/" & 1 & "/" & NewYear)
End If
End Sub
So it correctly adjusts the cell then gives an error because it tries to do it to the next cell (I believe). Thanks in advance.
Bookmarks