Setting the property of a nested shape

D

dave

Hi All,

How would i change the custom property of a nested shape sheet using the
vsoShapeOnPage. This particular shape has several sheets. This is what
I've tried vsoShapeOnPage("Sheet.12").CellU(Prop.Row_1) = "PutTextHere"
wothout success.

Dave
 
J

junethesecond

Shape.Shapes property will retrieve child shape in the grouped shape. Same
type of theme is going at the former post.
 
D

dave

Hi Junethesecond

I've tried this out without success. Any pointer would be appreciated

Dave

Sub UsingShapeShapesProperty()
Dim vsoShapeOnPage As Visio.Shape
Dim vsoShapeOnPageChildShape As Visio.Shape
For Each vsoShapeOnPage In ActiveWindow.Selection
For Each vsoShapeOnPageChildShape In vsoShapeOnPage.Shapes
If vsoShapeOnPageChildShape.ID = 12 then
set vsoShapeOnPageChildShape.CellU(Prop.Row_1) = "PutTextHere"
end if

Next vsoShapeOnPageChildShape
Next vsoShapeOnPage
End Sub()
 
J

junethesecond

vsoShapeOnPageChildShape.Cells("Prop.Row_1").Formula = """PutTextHere"""

would be easy to succeed.
 
D

dave

Hi Junethesecond
Thanks for the reply,

Your VB works great with total success. It is helping me understand
VisioVB. What I discovered todate is that I'm creating very inaccessiable
shapes. When I run the shape.shapes property() is loops through only a few
of the several shapes. Then I selected the parent shape and ungroup it.
After that I was able to loop through the shapes. Is there anyway to
ungroup a parent shape and re-group it afterwards using VB
Dave
 
J

junethesecond

Why dont you try Ungruop method and Group method?
vsoShape.Ungroup
MsgBox " ungrouped."
ActiveWindow.Selection.Group
MsgBox " grouped again."
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top