I have this code:
strInfo = "3101234567 Ryan Maybach"
Dim varSplit As Variant
varSplit = Split(strInfo, " ")
strPhoneNumber = varSplit(0)
strOwner = varSplit(1)
So, strPhoneNumber = “3101234567” and strOwner = “Ryan”
I want to make it so that strOwner = “Ryan Maybach”, the full name, and not just the first name.
How do I split the strInfo string at the first instance of a space ” “?
From the MSDN documentation on the Split function:
If you only want to split on the first delimiter then you would specify 2 as the maximum number of parts.