Passing Arrays - Programmers Heaven

Howdy, Stranger!

It looks like you're new here. If you want to get involved, click one of these buttons!

Categories

Passing Arrays

fizzerchrisfizzerchris Posts: 5Member
Can someone give me an example of how to pass an array to a procedure on another form or code module, like the following:

A main form has an array with 4 elements. I want to have a Code Module with a function that will initialize the array to specified values for use on the main form.

During program execution, the main form will call another form that will allow you to modify the values of the array.

Whenever I try calling the procedure on the other form, I am getting a runtime error 458. I can post all the code if you would like to see it.


Comments

  • BattleGuardBattleGuard Posts: 166Member
    Hi,
    I think that declaring a public variable in a module, which you can create in the solution explorer (Project window), would work for this situation...

    HTH
    BattleGuard

    : Can someone give me an example of how to pass an array to a procedure on another form or code module, like the following:
    :
    : A main form has an array with 4 elements. I want to have a Code Module with a function that will initialize the array to specified values for use on the main form.
    :
    : During program execution, the main form will call another form that will allow you to modify the values of the array.
    :
    : Whenever I try calling the procedure on the other form, I am getting a runtime error 458. I can post all the code if you would like to see it.
    :
    :
    :

Sign In or Register to comment.