Results 1 to 2 of 2

Thread: Arrays

  1. #1

    Thread Starter
    New Member
    Join Date
    Nov 2000
    Posts
    9

    Question

    Is there any way in VB5 that I can set the contents of an array of strings with one line of code like with C?
    for exapmle:
    Array1 = ("one", "two", "three", "four")

    to set Array1(0) to "one"
    Array1(1) to "two"
    etc...




  2. #2
    Frenzied Member Jop's Avatar
    Join Date
    Mar 2000
    Location
    Amsterdam, the Netherlands
    Posts
    1,986
    Sure!

    Code:
    Dim test() As Variant
    test = Array("jop", "hey", "how are you doing")
    MsgBox test(2)
    Jop - validweb.nl

    Alcohol doesn't solve any problems, but then again, neither does milk.

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