Results 1 to 2 of 2

Thread: Array Referencing - help urgent

  1. #1

    Thread Starter
    Junior Member
    Join Date
    Jan 2002
    Posts
    28

    Question Array Referencing - help urgent

    Hi ,
    i am new to VB programming , can someone tell me how to pass Arrays as parameters.
    Thanx

  2. #2
    Need-a-life Member Mc Brain's Avatar
    Join Date
    Apr 2000
    Location
    Buenos Aires, Argentina
    Posts
    6,808
    Check this example:
    VB Code:
    1. Option Explicit
    2.  
    3. Private Sub Form_Load()
    4.     Dim arr(7) As String
    5.    
    6.     arr(0) = "000"
    7.     arr(1) = "001"
    8.     arr(2) = "010"
    9.     arr(3) = "011"
    10.     arr(4) = "100"
    11.     arr(5) = "101"
    12.     arr(6) = "110"
    13.     arr(7) = "111"
    14.    
    15.     PrintThemAll arr
    16. End Sub
    17.  
    18. Private Sub PrintThemAll(arr() As String)
    19.     Dim i As Integer
    20.    
    21.     For i = LBound(arr) To UBound(arr)
    22.         Debug.Print arr(i)
    23.     Next i
    24. End Sub
    Emiliano F. Martín


    If a post has helped you then please Rate it! (and give the user points he/she deserves by clicking on the image).
    Encourage the person who helped you to keep doing it, and give him the points he deserves.


    MP3 Organizer: Freeware to logically organize all your MP3s.

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