Parse Strings

MadeCurler

enthusiastic pensioner
Local time
Today, 16:59
Joined
Dec 6, 2007
Messages
49
How do I split "Hello World" into two distinct objects:
String 1 = "Hello World" (I then want)
String 2 = "Hello"
String 3 = "World"

Do I use the Split function?

Regards
 
Yes, you can use the split function:

Dim varSplit As Variant

varSplit = Split(String1, " ")

Then you can get the values by

String2 = varSplit(0)
String3 = varSplit(1)
 
Bob - Thanks very much....sorry I posted the question in the wrong place...I'm still getting used to the site....Regards....Bill
 

Users who are viewing this thread

Back
Top Bottom