A
Andoni
Hi, and Many Thanks in advance
what's wrong here:
I would like to declare the XeY array properly, but don't know how
Sub Myarray()
Dim XeY '????????????????(7) As Variant
Dim X As Byte
X = Int((2* Rnd) + 1)
Dim Y As Byte
Select Case X
Case 1: XeY = Array(2, 1, 0, -1, -1, 0, 1, 2)
Case 2: XeY = Array(-1, 0, 1, 2, 1, 0, -1, -2)
End Select
For Y = LBound(XeY) To UBound(XeY)
MsgBox XeY(Y)
Next Y
End Sub
MyArray sub is just one example, has nothing to do with my request,
only want to know how can I declare the XeY array properly
when XeY will have always 7 elements ranging each element from 0 to 9.
XeY(7) as Byte does not wor
what's wrong here:
I would like to declare the XeY array properly, but don't know how
Sub Myarray()
Dim XeY '????????????????(7) As Variant
Dim X As Byte
X = Int((2* Rnd) + 1)
Dim Y As Byte
Select Case X
Case 1: XeY = Array(2, 1, 0, -1, -1, 0, 1, 2)
Case 2: XeY = Array(-1, 0, 1, 2, 1, 0, -1, -2)
End Select
For Y = LBound(XeY) To UBound(XeY)
MsgBox XeY(Y)
Next Y
End Sub
MyArray sub is just one example, has nothing to do with my request,
only want to know how can I declare the XeY array properly
when XeY will have always 7 elements ranging each element from 0 to 9.
XeY(7) as Byte does not wor