+ Reply to Thread
Results 1 to 4 of 4

Array Help

  1. #1
    Sandy
    Guest

    Array Help

    can I creat a public array, the contents of which are visinle to all
    procuedures in the project? How do I do this?

    Thanks

  2. #2
    crferguson@gmail.com
    Guest

    Re: Array Help

    Declare the array as Public right below the Option Explicit inside a
    module.


    Sandy wrote:
    > can I creat a public array, the contents of which are visinle to all
    > procuedures in the project? How do I do this?
    >
    > Thanks



  3. #3
    crferguson@gmail.com
    Guest

    Re: Array Help

    Declare the array as Public right below the Option Explicit inside a
    module. For example:

    Option Explicit

    Public arrTest()

    Public Sub SomeSub...

    End Sub...

    etc...


    Sandy wrote:
    > can I creat a public array, the contents of which are visinle to all
    > procuedures in the project? How do I do this?
    >
    > Thanks



  4. #4
    Tom Ogilvy
    Guest

    RE: Array Help

    at the top of the module

    Public vArr(1 to 10) as Long

    then if necessary initialize it in one of your procedures

    Sub IntivArr()
    for i = lbound(varr) to ubound(varr)
    varr(i) = int(rnd*100+1)
    Next
    End sub

    You will need to call InitvArr at least once before you try to extract any
    values from the array (if that is what you need to do).

    --
    Regards,
    Tom Ogilvy

    "Sandy" wrote:

    > can I creat a public array, the contents of which are visinle to all
    > procuedures in the project? How do I do this?
    >
    > Thanks


+ Reply to Thread

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts

Search Engine Friendly URLs by vBSEO 3.6.0 RC 1