I have an InputBox that pops up and asks for entering Date or a Text. I want to have an If Then Else that checks if the value passed is Date or a string. If its a date, then I need to change the format and then insert it into a table. I have the insert statements and everything else is working, except how to check if the string is date.
Any ideas? For example, if someone types 'xyzabcdef', how would I check if that string is a Date or not?
Dim strDate as String
strDate = InputBox("Please enter date.",Pay Date")
If strDate = DATE (need to check here like this) Then
strDate = Format(strDate,"mm-dd-yy")
End If
Any ideas? For example, if someone types 'xyzabcdef', how would I check if that string is a Date or not?
Dim strDate as String
strDate = InputBox("Please enter date.",Pay Date")
If strDate = DATE (need to check here like this) Then
strDate = Format(strDate,"mm-dd-yy")
End If