Sign in with Microsoft
Sign in or create an account.
Hello,
Select a different account.
You have multiple accounts
Choose the account you want to sign in with.

會傳回 Boolean 值,指出 變數 是否為 陣列。

語法

IsArray ( varname )

必要的 varname引數 是指定變數的識別碼。

註解

如果變數為陣列,IsArray 會傳回 True;否則,它會傳回 FalseIsArray 對於包含數位的變體特別有用。

範例

附註: 下列範例示範如何在 Visual Basic for Applications (VBA) 模組中使用此函數。 如需使用 VBA 的詳細資訊,請在 [搜尋] 旁的下拉式清單中選取 [開發人員參考],並在 [搜尋] 方塊中輸入一個或多個字詞。

此範例使用 IsArray 函數來檢查變數是否為數位。

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

Need more help?

Want more options?

探索訂閱權益、瀏覽訓練課程、瞭解如何保護您的裝置等等。

社群可協助您詢問並回答問題、提供意見反應,以及聆聽來自具有豐富知識的專家意見。

Was this information helpful?

How satisfied are you with the translation quality?
What affected your experience?
By pressing submit, your feedback will be used to improve Microsoft products and services. Your IT admin will be able to collect this data. Privacy Statement.

Thank you for your feedback!

×