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

Welcome to the new platform of Programmer's Heaven! We apologize for the inconvenience caused, if you visited us from a broken link of the previous version. The main reason to move to a new platform is to provide more effective and collaborative experience to you all. Please feel free to experience the new platform and use its exciting features. Contact us for any issue that you need to get clarified. We are more than happy to help you.

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.