Hi,
I cannot get this code to work if the user cancels hits the cross or enters nothing.
Cancel2 then exits the sub
Can anyone offer any assistance?
John
I cannot get this code to work if the user cancels hits the cross or enters nothing.
Code:
Sub Reset()
Dim newyr As Date
Dim Tmpl As Worksheet
Set Tmpl = ThisWorkbook.Sheets("Template")
newyr = (InputBox("Enter first date of Week 1 of new calender year", "Enter Date (DD/MM/YYYY)"))
If Len(newyr) = 0 Then GoTo Cancel2
Sheet5.Range("A5").Value = newyr
Sheet5.Range("A5").NumberFormat = "dd/mm/yyyy;@"
Can anyone offer any assistance?
John