Table of contents
Collapse the table of content
Expand the table of content

Range has no values

office 365 dev account|Last Updated: 6/12/2017
1 Contributor

There are limitations on the way you can specify the number of elements in an array. This error has the following cause and solution:

  • You specified your array boundaries incorrectly. For example, the following ranges are invalid:
Dim MyArray(10 To -5)    ' Descending order not permitted. 
Dim MyArray(0 To 0)        ' No elements in the array. 
Check to be sure your syntax is correct. For example, the following range is valid:
Dim MyArray(-5 To 10)

For additional information, select the item in question and press F1 (in Windows) or HELP (on the Macintosh).

© 2018 Microsoft