Expand Minimize
1 out of 1 rated this helpful - Rate this topic

Range has no values

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).

Did you find this helpful?
(1500 characters remaining)

Community Additions

ADD
© 2013 Microsoft. All rights reserved.