Question

I have a complex stencil with many small shapes (sheet.6 to 43), grouped in a group (sheet.44). There is also sub-groups in it.

I want to hide this group using shapesheet formulas to use a user propertie.

On a simple shape I would set : Geometry1.NoShow=sheet.44!user.isHidden Miscellaneous.HideText=sheet.44!user.isHidden

But how to make it inherited in all sub shapes ? with vba ?

Edit with Answer :

Thank you Jon for corfirming that there is no other way than VBA. Here is my VBA code for all of you who are having the same problem.

Call makeithidden("Sheet.164!Geometry1.NoShow", myshape)


Sub makeithidden(formula As String, ByVal myshape As Shape)
    For Each subShape In myshape.Shapes
        subShape.Cells("geometry1.noShow").FormulaForceU = formula
        subShape.Cells("HideText").FormulaForceU = formula
        Call makeithidden(formula, subShape)
    Next subShape
End Sub

See you guys !

Was it helpful?

Solution

Your VBA code would have to loop through all the sub shapes and set that formula up, any time the group gets a new shape. The format of the formula would be just like your example, so it wouldn't be too hard to do:

SubShp.CellsSRC(visSectionFirstComponent,0,2).FormulaU = "Sheet." & Cstr(ParShp.ID) & "!Geometry1.NoShow"

or something like that, where that's in a loop for each SubShp in ParShp.Shapes...

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top