Visio (的 Cell.Dependents 屬性)
會傳回依存於 Microsoft Visio 圖形之特定儲存格的 ShapeSheet 儲存格陣列。 唯讀。
語法
運算式。家屬
表達 會傳回 Cell 物件的運算式。
傳回值
Cell ()
註解
Dependents 屬性會傳回儲存格的陣列,這些儲存格會在父單元格物件的公式或值變更時重新計算其值。
範例
下列 Microsoft Visual Basic for Applications (VBA) 巨集會示範如何使用 Dependents 屬性顯示依存於矩形圖形 Width 儲存格的儲存格清單。
Public Sub Dependents_Example()
Dim acellDependentCells() As Visio.Cell
Dim vsoCell As Visio.Cell
Dim vsoShape As Visio.Shape
Dim intCounter As Integer
'Draw a rectangle on the active page.
Set vsoShape = ActivePage.DrawRectangle(1, 5, 5, 1)
'Get the array of cells dependent on the Width cell of the shape
acellDependentCells = vsoShape.Cells("Width").Dependents
'List the cell names and their associated formulas
For intCounter = LBound(acellDependentCells) To UBound(acellDependentCells)
Set vsoCell = acellDependentCells(intCounter)
Debug.Print vsoCell.Name & " has this formula: " & vsoCell.Formula
Next
End Sub
支援和意見反應
有關於 Office VBA 或這份文件的問題或意見反應嗎? 如需取得支援服務並提供意見反應的相關指導,請參閱 Office VBA 支援與意見反應。