You can select all the shapes you are interested in, then type a simple line
of VBA code in the "Immediate" window in the VBA environment.
? Visio.ActiveWindow.Selection.Count
If you've done a net-selection around a whole bunch of shapes, then it will
be something more like:
? (Visio.ActiveWindow.Selection.Count - 1 ) / 2
That removes the connectors from the total, but this is more dodgy, because
you might have missed some of the connectors when selecting.
To count subordinates entirely by code, you'll have to analyze the
FromConnects collection of each shape, starting at the top. This is nice,
because you only need to specify the top shape to get everything underneath.
The FromConnects contains a collection of Connects objects, which let you
determine which connectors are attached to the shape. Then you can see which
shapes are on the other end of each connector, on down the line. It's a bit
more difficult, and I'm not sure that this is what you're looking for.
--
Hope this helps,
Chris Roth
Visio MVP