共用方式為


Subscript out of range (Microsoft Windows Script Technologies)

The array you are trying to access contains fewer elements than you expect. For example, attempting to access the 11th element of an array dimensioned for ten elements.

To correct this error

  • Make sure your code contains bounds checking that ensures elements beyond the scope of the array are not referenced.

  • Re-dimension the array to a larger size that meets your needs.

See Also

Reference

UBound Function

LBound Function

Dim Statement

ReDim Statement