Date not defaulting to current year

T

Tim Elhatton

Hi there,
I would like a user to enter JUST the Day and Month....and the year default
to 2008.
Does anyone have any ideas?
 
D

Don Guillett

Right click sheet tab>view code>copy/paste this>change column to suit>format
column as desired

Private Sub Worksheet_Change(ByVal Target As Range)
If Target.Column <> 7 Then Exit Sub
Application.EnableEvents = False
Target = DateSerial("2008", Month(Target), Day(Target))
Application.EnableEvents = True
End Sub
 
D

Don Guillett

Your subject line said "CURRENT" year and your msg said 2008.
On my xl2003 if if type 11/16 I automatically get the CURRENT year.
 
Top