Getting Cells and Querying Cells in Visio ShapeSheets
Thus far you have accessed the Cells property of a Shape object by name to obtain a reference to a specific cell. In most cases, this is the best way to accomplish this task. However, you may need to iterate through sections, rows, and cells in a given SmartShape symbol's ShapeSheet; for example, in a symbol with multiple Geometry sections. To accomplish this, you can use the section, row, and cell indices. Both VISCONST.BAS and the Visio Type Library viewable via the Object Browser give you full information for all of these section, row, and cell constants.
Look at the following example for a cell in a Controls section:
Set celObj = shpObj.CellsSRC(visSectionControls, visRowControl +3, visCtlX) ...