Results 1 to 4 of 4

Thread: Arrays

  1. #1

    Thread Starter
    Lively Member
    Join Date
    Sep 2002
    Posts
    120

    Arrays

    Hi,

    What is the code for 2d arrays i thing it's as below but it does not work,



    dim myarray as string

    myarray = array(10,10)


    myarray(4,6) = "String"


    Thanks

    Joolz

  2. #2
    Frenzied Member vbgladiator's Avatar
    Join Date
    May 2001
    Posts
    1,950
    VB Code:
    1. Dim myarray(10,10) as string
    2. myarran(4,6) = "String"

  3. #3

    Thread Starter
    Lively Member
    Join Date
    Sep 2002
    Posts
    120
    Thanks

  4. #4
    PowerPoster
    Join Date
    Aug 2002
    Location
    NY, NY
    Posts
    2,139
    Some crazy sample just to give you an idea:
    [Highlight=VB]
    Dim MyArray(9, 9) As String
    Dim i%, j%

    For i = 0 To 9
    For j = 0 To 9
    MyArray(i, j) = i & "Item " & j
    Next j
    Next i
    Debug.Print MyArray(5, 9)
    [/bvcode]
    Roy

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