Results 1 to 3 of 3

Thread: Arrays

  1. #1

    Thread Starter
    Junior Member
    Join Date
    Feb 2000
    Location
    Dallas,Tx,USA
    Posts
    30
    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.

  2. #2
    Guest
    You mean this?
    Code:
    MyString = Array("One", "Two", "Three", "Four")
    Print MyString(2) 'returns 3

  3. #3
    Guest
    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
  •  



Click Here to Expand Forum to Full Width