Is there a special code to detect a space in a string?
Printable View
Is there a special code to detect a space in a string?
One you can use (though there may be other VB constants)
Space(x)
x being however many characters you want spaces allocation for.
FBP
THICK, not reading it properly (fault I'm guilty of lately...must be this place..)
I don't know of one to detect a space...(enlightenment equally sought), I'd just use the instr() function with the " " identifier
or declare a constant equal to " "
Code:If InStr(TheString, " ")>0 Then
MsgBox "There is a space in the string"
End If
'or
If InStr(TheString, Chr$(32))>0 Then
MsgBox "There is a space in the string"
End If
yeah that' what I did too!
thanks for the info though