I have a macro where the user must inpput a date. I would like this amended so that the date must be entrred as dd/mm/yyy. If not message must appear "Please enter date correctly using dd/mm/yyyy
Code:
Sub Date_Input()
With Sheets("Statement")
Dim i As Variant
i = InputBox("Please Enter the Statement Month End for e.g. 31/10/2022")
.Range("AA1").Value = i
.Range("AA2").FormulaR1C1 = "=DATEVALUE(R[-1]C)"
.Range("AA2").Copy
.Range("AA1").PasteSpecial Paste:=xlPasteValues
Application.CutCopyMode = False
.Range("AA2").ClearContents
End With
End Sub