|Bookshelf Home | Contents | Index | PDF|
Dynamic arrays differ from fixed arrays because a subscript range for the array elements is not specified when the array is dimensioned. Instead, the subscript range is set using the ReDim statement. With dynamic arrays, the number of array elements can be set based on other conditions in your procedure. For example, you may want to use an array to store a set of values entered by the user, but you may not know in advance how many values the user will enter. In this case, you dimension the array without specifying a subscript range and then execute a ReDim statement each time the user enters a new value. Or you may want to prompt for the number of values to be entered and execute one ReDim statement to set the size of the array before prompting for the values.
If you declare a dynamic array (with a Dim statement) before using it, the maximum number of dimensions it can have is 8. To create dynamic arrays with more dimensions (up to 60), do not declare the array at all and use only the ReDim statement inside your procedure.
|Siebel VB Language Reference|