Results 1 to 4 of 4

Thread: Accessing Dynamic arrays between forms ?

  1. #1

    Thread Starter
    New Member
    Join Date
    Jul 2002
    Posts
    2

    Accessing Dynamic arrays between forms ?

    I want to use the same Dynamic array in a number of forms in a project.
    How can I do that ?
    Thanks
    Xzyeena.

  2. #2
    Hyperactive Member wordracr's Avatar
    Join Date
    Aug 2001
    Posts
    281
    Add a code 'Module' to your project.

    Then in the module, declare public variables and functions that you want all forms to have access to.

    Keyboard shortcut: ALT+P , M

    Is that what you're looking for?

  3. #3

    Thread Starter
    New Member
    Join Date
    Jul 2002
    Posts
    2
    Where Do i Type the ' Module' ?
    I have 7 forms and i want to use an array across these 7 forms.

    Can I write this in the first form ? under Declarations ,option Explicit ?

    Thanks.

  4. #4
    Hyperactive Member wordracr's Avatar
    Join Date
    Aug 2001
    Posts
    281
    Anything variables you type in the forms won't be visible to the other forms.

    Like I said, add a module. I gave you the keyboard shortcut.
    When you create a module, it will be listed in the project explorer if you have that window open.

    A module just holds code that all forms can use, given that variables and functions are defined "Public"

    In the module:

    Public strArray() as String

    If you don't understand the keyboard shortcut, you might want to learn. I find them very useful at times.

    With the mouse, you can click on the Project menu, then goto "Add Module".

    Do you have it now?

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