-
arrays
I am trying to write a tetris like program for an
intro to programing class i am taking and i wanted to use an array to tell wether a box had been filled or not, to do this i would need to make the array public. It (vb5)won't let me do this. does anyone know how to make an array public or some other way to record whether a box has been filled? thanks for all the help.
-
Re: arrays
You can make an array public by declaring it in the General - declarations section of your project. If that doesn't work, try putting the word public in front of it instead of "dim"
Example:
General Declarations
Public array(3) as integer
-
Re: arrays
Neither of those things work with arrays, It gives me a...
"compile error:
constants, fixed-leingth arrays, and declare statements, not allowed as public members of object modules."
message box. thanks though
-
Re: arrays
You have to declare the public array in a module, not a form.
-
Re: arrays
The previous posts are correct. You need to add a Module to your project and declare it there. You can't declare it in a form's General Declarations. It has to be in a module.
-
Re: arrays
-
Re: arrays
In your Project Explorer window, right-click at your project name, and select "Add Module"... simple as that... sorry that this post has nothing to do with the above, but it is right, you can't declare your array in the General Declaration section of your form.
____________________________________
The VB Bugs in my Life...