Invalid subscript reference (Error 31)

A subscript was used that is outside of the valid range of array subscripts defined in the DIMENSION statement. This might also be caused by using two subscripts with a one-dimensional array.