I'm asking for 2 dates for a report, the default date for start date is Today() and for end date is start date, I want to exit the sub if the user cancels, but keep getting error Type mismatch. Already have tried to check for False, "" and StrPtr with no success.
Any idea.
Thanks!
VBA Code:
StrDate= InputBox("Report start date? (dd/mm/aa)", "Report", Format(Now(), "dd/mm/yy"))
If StrPtr(StrDate) = 0 Then
Exit Sub
End if
EndDate= InputBox("Report end date? (dd/mm/aa)", "Report", Format(StrDate, "dd/mm/yy"))
If EndDate = "" Then
Exit Sub
End if
Any idea.
Thanks!