Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations TouchToneTommy on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

String Splitting Help 1

Status
Not open for further replies.

WildGun

Technical User
Jan 13, 2005
15
US
I have read through the forum and I still don't get it, I have a comm port setting string that is stored in the registry as "9600,8,n,1" or "38400,7,e,0" or some thing like this. I am having problems formulating the expression to split it, and msdn confuses me even more, any help is greatly appreciated.

Thanks

Randy
 
Randy

Put this under a Command Button
Code:
Dim MyFirstArray() As String
Dim MySecondArray() As String

MyFirstArray = Split("8,n,1", ",")

Debug.Print MyFirstArray(0)
Debug.Print MyFirstArray(1)
Debug.Print MyFirstArray(2)

MySecondArray = Split("38400,7,e,0", ",")
Debug.Print MySecondArray(0)
Debug.Print MySecondArray(1)
Debug.Print MySecondArray(2)
Debug.Print MySecondArray(3)
The Spit() function auto-magically rediminsions and populates your array

hope this helps
Scoty ::)

"Learn from others' mistakes. You could not live long enough to make them all yourself."
-- Hyman George Rickover (1900-86),
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top