You can declare an array types as dynamic if a ReDim statement defines the number of dimensions in the subroutine or the function that contains the array. Generally, you can only define an array dimension once and you cannot modify it. Within a subroutine, you can declare an array with ReDim. You can only define dimensions with numerical expressions. This ensures that the fields are only as large as necessary.
如果使用 ReDim 语句在含有某个数组的子例行程序或函数中定义了维数，则可以将该数组的类型声明为动态。通常，您只能定义一次数组维数，并且定义之后不能修改。在子例行程序中，您可以使用 ReDim 声明数组。只能使用数字表达式来定义维数，这样可以确保字段为所需的大小。