Table of contents
TOC
Collapse the table of content
Expand the table of content

Cell.Dependents Property (Visio)

office 365 dev account|Last Updated: 6/12/2017
|
1 Contributor

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
© 2018 Microsoft