|
-
Nov 16th, 2000, 03:40 PM
#1
Thread Starter
Fanatic Member
I would like to grab every character in a combo box until the first space. How would I do that, left, mid, trim???
-
Nov 16th, 2000, 03:46 PM
#2
Guru
Try this:
Code:
Dim sTextUpToSpace As String
Dim lSpacePos As Long
sTextUpToSpace = MyComboBox.Text
lSpacePos = InStr(sTextUpToSpace, " ")
If lSpacePos Then sTextUpToSpace = Left(sTextUpToSpace, lSpacePos - 1)
' Now use sTextUpToSpace.
Enjoy!
-
Nov 16th, 2000, 03:47 PM
#3
Code:
Dim Str As String
Str = Left$(Trim$(Combo1.Text), InStr(1, Combo1.Text, " "))
Print Str
-
Nov 16th, 2000, 07:10 PM
#4
_______
<?>
In VB6
Dim Str As Variant
Str = Combo1.Text
Str = Split(Str, " ")
MsgBox Str(o)
"A myth is not the succession of individual images,
but an integerated meaningful entity,
reflecting a distinct aspect of the real world."
___ Adolf Jensen
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|