Cell.Dependents property (Visio)
Returns an array of ShapeSheet cells that are dependent on a particular cell of a Microsoft Visio shape. Read-only.
Syntax
expression.Dependents
expression An expression that returns a Cell object.
Return value
Cell()
Remarks
The Dependents property returns an array of the cells that recalculate their values when the formula or value of the parent Cell object changes.
Example
The following Microsoft Visual Basic for Applications (VBA) macro shows how to use the Dependents property to display a list of cells that are dependent on the Width cell of a rectangle shape.
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
Support and feedback
Have questions or feedback about Office VBA or this documentation? Please see Office VBA support and feedback for guidance about the ways you can receive support and provide feedback.