Reputation: 143
I have one string that has two words in it:
Cat Dog
How can I split these up so I get:
Str1 = Cat
and Str2 = Dog
Please note this is for VB6.
Upvotes: 10
Views: 38439
Reputation: 2026
Use the Split function.
Dim output() As String
output = Split("Cat Dog", " ")
Would produce
output(0) = Cat
output(1) = Dog
Upvotes: 24