|
-
Oct 11th, 2000, 05:16 PM
#1
Thread Starter
Junior Member
i want to create an array with a variable
r= "list","run","help","suck"
myaaray = array(r)
fitem = myarray(0) 'This returns of course "list","run","help","suck"
i want fitem to = the first item in the list ("list")
my question is how to do i make an array out of an already existing string.
-
Oct 11th, 2000, 05:21 PM
#2
You mean this?
Code:
MyString = Array("One", "Two", "Three", "Four")
Print MyString(2) 'returns 3
-
Oct 11th, 2000, 05:33 PM
#3
Or this?
Code:
Option Explicit
Option Compare Text
Option Base 0
Sub Whatever_Event()
Dim string_Ex As String, arrayEx() As String
string_Ex = "ss,dd,ee,rr,yy,gfgs,fsgsfthgjg, " _
"gfhgfds,gfdsg,fdsg,sfgs,dg,sdg,sf,dsg,f,gsfdg,fds,gf,gdfsd"
arrayEx = Split(string_Ex,",")
MsgBox arrayEx(4) 'Returns "ee"
End Sub
Fully.
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
|