Quantcast
Channel: VBForums - Visual Basic 6 and Earlier
Viewing all articles
Browse latest Browse all 21246

[RESOLVED] Global Arrays

$
0
0
Hi,
I'm doing my computing soursework for school and have come across one final problem which I though would be very simple to correct.
All I need to do is define 2 different arrays so that they are all global and accessable by all forms.
I have tried declairing them as a global variable ;

Dim Player(0 to 2) as string
Dim Score(0 to 2) as integer

This does not work as the array is only accessable to one form.
I have also tried;

Public Player(0 to 2) as string
Public Score(0 to 2) as integer

This returns an error saying arrays cannot be global.

Any help would be amazing! Thanks in advance. :)

Viewing all articles
Browse latest Browse all 21246

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>