G
Guest
I have a function that works whenever anyone puts more than one word in a box
but now the staff are getting used to filling in a box correctly the function
gives debugs:
Public Function FirstWord(InputString As String) As String
Dim FirstSpace As String
FirstSpace = InStr(1, InputString, " ")
FirstWord = Left(InputString, FirstSpace - 1)
End Function
How do I tweak it to check that there is a space or ignore the input?
but now the staff are getting used to filling in a box correctly the function
gives debugs:
Public Function FirstWord(InputString As String) As String
Dim FirstSpace As String
FirstSpace = InStr(1, InputString, " ")
FirstWord = Left(InputString, FirstSpace - 1)
End Function
How do I tweak it to check that there is a space or ignore the input?