0 to 8 array to 3 by 3 xy plain :

Code:

Private Sub setXY(ByVal n As Integer)
            y = (n + 3) \ 3
            x = (n Mod 3) + 1
        End Sub

👅