Try this...
Dim sFirstWord As String
Dim nPosition As Integer
nPosition = InStr(1, Text1.Text, " ")
If nPosition <> 0 Then
sFirstWord = Left(Text1.Text, nPosition)
Else
sFirstWord = Text1.Text
End If
MsgBox sFirstWord
|
Results 1 to 4 of 4
Threaded View
|
Click Here to Expand Forum to Full Width |