I need your help with the below code. I'm trying to have this code evaluate the content of an imported text field. The field can only have 1 of 5 possible results (yes, y, no, n, and Null). The evaluation should not be case sensitive.
The code below is giving me a Type mismatch error.
Thanks in advance for your help.
Function chkYesNo(ByVal varValue As Variant) As Boolean
'Check if varValue is Null, Y, Yes, N, No
If varValue = "yes" Or "y" Or "no" Or "n" Then
chkYesNo = True
chkYesNo = IsNull(varValue)