Hi all,
I'm using the following code to get the user to enter the Week commencing date of a report into cell K12 of the Performance_Report sheet. The macro works fine apart from returning the year as 1900. I've searched all over the net and cant find a reason why this is happening - can anyone help?
Sub Date_Entry()
Dim Request As String
Dim ReportTitle As String
Dim DefValue As Date
Dim ReportDate As Date
Request = "Please enter the Week Commencing Date"
ReportTitle = "CEC Weekly Performance Report"
DefValue = Date - 7
ReportDate = Val(InputBox(Request, ReportTitle, DefValue))
Sheets("Performance_Report").Select
Range("K12").Value = ReportDate
Selection.NumberFormat = "dd mmmm yy"
End Sub