|
-
January 10th, 2000, 10:59 AM
#1
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.
-
January 10th, 2000, 11:19 AM
#2
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
-
January 10th, 2000, 11:37 AM
#3
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
-
January 10th, 2000, 12:00 PM
#4
Re: arrays
You have to declare the public array in a module, not a form.
-
January 10th, 2000, 10:15 PM
#5
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.
-
January 10th, 2000, 11:23 PM
#6
-
January 10th, 2000, 11:36 PM
#7
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...
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|