IsArray 函数IsArray function

返回指示变量 是否是数组Boolean 值。Returns a Boolean value indicating whether a variable is an array.



必需的_varname_ 参数是指定变量的标识符The required varname argument is an identifier specifying a variable.


“IsArray”**** 在变量是数组时返回“True”****;否则返回“False”****。IsArray returns True if the variable is an array; otherwise, it returns False. “IsArray”**** 对包含数组的变量尤其有用。IsArray is especially useful with variants containing arrays.


此示例使用 IsArray 函数检查变量是否是数组。This example uses the IsArray function to check if a variable is an array.

Dim MyArray(1 To 5) As Integer, YourArray, MyCheck    ' Declare array variables.
YourArray = Array(1, 2, 3)    ' Use Array function.
MyCheck = IsArray(MyArray)    ' Returns True.
MyCheck = IsArray(YourArray)    ' Returns True.

另请参阅See also

支持和反馈Support and feedback

有关于 Office VBA 或本文档的疑问或反馈?Have questions or feedback about Office VBA or this documentation? 请参阅 Office VBA 支持和反馈,获取有关如何接收支持和提供反馈的指南。Please see Office VBA support and feedback for guidance about the ways you can receive support and provide feedback.