Results 1 to 4 of 4

Thread: Global Redim()

  1. #1

    Thread Starter
    Lively Member
    Join Date
    Nov 2000
    Location
    Posts
    124

    Global Redim()

    How do we do a Redim() to declare a global array ?

  2. #2
    Bouncy Member darre1's Avatar
    Join Date
    May 2001
    Location
    Peterborough, UK
    Posts
    3,828
    VB Code:
    1. Redim array(0)

    0 being the upper bound of the dimension
    Confucious say, "Man standing naked in biscuit barrel not necessarily ****ing crackers."

    Don't forget to format your code in your posts

  3. #3

    Thread Starter
    Lively Member
    Join Date
    Nov 2000
    Location
    Posts
    124
    Sorry, I meant how do I Redim(n) as a global variables in a sub. I have done
    VB Code:
    1. global sArray(5) as string
    2.  
    3.  
    4. Private Sub GetNumber(ArrayNum as integer)
    5.  
    6. Redim sArray(ArrayNum) as string
    7.  
    8. End Sub

    sArray seems to be changed to a local variable instead of a global variable.

    Thanks.

  4. #4
    Lively Member
    Join Date
    Jan 2002
    Posts
    74
    VB Code:
    1. global sArray(5) as string
    should be
    VB Code:
    1. global sArray() as string

    if you want to be able to redim it.

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