Results 1 to 2 of 2

Thread: Sub

  1. #1

    Thread Starter
    Member
    Join Date
    Jun 2000
    Posts
    55

    Angry

    i have a sub and i have problems with using arrays in it.
    my sub needs to use an array which belongs to the whole app
    and to build another array which the app will use later

    i don't know how to define the arrays, please help

  2. #2
    Fanatic Member
    Join Date
    Mar 2000
    Location
    That posh bit of England known as Buckinghamshire
    Posts
    658
    OK. You will need two global, or form level arrays then. Sound like you want the sub to return an array, so maybe a function would be better.

    Pass the 1st array to the function, and return the new one.

    Code:
    Private Function newArray(myArray() As String) as String()
      'code
    End Function
    
    'to call
    myNewArray = newArray(my1stArray)
    Iain, thats with an i by the way!

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