I am working on a function that will scan a string to see if it has a comma. If I use
This properly identifies the comma - however I’m needing to pass in a string and when I do this it always shows no comma
Code:
Function CommaCheck()
If InStr(“Bob, Frank, James”, “,”) = 0 Then
Debug.Print “No comma”
Else
Debug.Print “At least one comes”
End If
End Function
This properly identifies the comma - however I’m needing to pass in a string and when I do this it always shows no comma
Code:
Dim namesList As String
namesList = “Bob, Frank, James”
If InStr(namesList, “,”) = 0 Then
Debug.Print “Nope”
Else
Debug.Print “At least one”
End If