Declared array globally

Chong

Regular
Joined
Apr 4, 2003
Messages
79
Why I can't I do the following and get it working?
Dim intNumbRank As Integer = CInt(txtRank.Text())

Dim aryRank(intNumbRank) As Integer
I want to declare the Array as global for the Class or Form so I can use the array any where on the form. But I always get an blue underline under the variable intNumbRank inside the parenthesis. Please help me correct my code.

Many thanks in advance!

Chong
 
If you hold your mouse over the blue line it tells you what the problem is. It tells you that it requires a constant value within the parenthesis
 
Back
Top