當樞紐欄位包含成員屬性時,則傳回 True。 唯讀的 Boolean。
語法
表達。IsMember屬性
詞 代表 PivotField 物件的變數。
註解
如果沒有使用線上分析處理 (OLAP) 資料來源,則此屬性會傳回執行階段錯誤。
範例
本範例將判斷樞紐分析表欄位是否含有成員屬性,並通知使用者。 假設使用中工作表上有一個樞紐分析表,並且該表格已連線至 OLAP 資料來源。
Sub CheckForMembers()
Dim pvtTable As PivotTable
Dim pvtField As PivotField
Set pvtTable = ActiveSheet.PivotTables(1)
Set pvtField = pvtTable.PivotFields(1)
' Determine if member properties exist and notify user.
If pvtField.IsMemberProperty = True Then
MsgBox "The PivotField contains member properties."
Else
MsgBox "The PivotField does not contain member properties."
End If
End Sub
支援和意見反應
有關於 Office VBA 或這份文件的問題或意見反應嗎? 如需取得支援服務並提供意見反應的相關指導,請參閱 Office VBA 支援與意見反應。