|
-
Oct 1st, 2001, 10:00 AM
#1
Thread Starter
Hyperactive Member
split function
how can i get the result of the split function in a variable?
i.e.:
Private Sub Form_Load()
Dim testje(10)
Dim mystring(10) As String
Dim i
i = 0
mystring(0) = "12,222,+,44,121"
For i = 0 To 4
testje(i) = Split(mystring(0), Chr(44))
Next i
End Sub
what am i doing wrong, testje(i) is not being filled..
-
Oct 1st, 2001, 10:01 AM
#2
Retired VBF Adm1nistrator
You have to declare a dynamic array for use with split :
VB Code:
Dim myStrArray() As String
myStrArray = Split(...)
Microsoft MVP : Visual Developer - Visual Basic [2004-2005]
-
Oct 1st, 2001, 10:03 AM
#3
Dim vntarray as variant
vntarray = Split(data,",")
-
Oct 1st, 2001, 10:08 AM
#4
PowerPoster
Originally posted by Cander
Dim vntarray as variant
vntarray = Split(data,",")
Don't use variants!!
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
|