J
Joe Cletcher
How do I test the value of a shape's text
box "LockTextEdit" property?
I have grouped 2 shapes (a graphics JPG file and a
rectangle drawn in VISIO) to form a custom shape. I want
the text box to show up in the rectangle so I have
protected the text boxes for the group and the JPG so
that changes to text in these shapes are not allowed.
However, I want to find the text that was entered into
the rectangle's text box, since that text identifies the
use of the symbol on the flow diagram.
I use code similar to the following where "visShape" is
the shape object discussed above:
Dim aShp as Visio.Shape
For Each aShp In visShape.Shapes
If Not aShp.Cells("LockTextEdit") then
' Do something here
End If
Next aShp
However, aShp.Cells("LockTextEdit") always returns a "0"
for false--i.e. the shape's text box is not protected.
This is true for the 3 shape's (the group, the JPG, and
the rectangle). I've also tried
aShp.Cells.CellsSRC(visSectionObject, visRowLock,
visLockTextEdit)
with similar results.
I currently work around this by testing for the length of
the text in each of the shapes because the group and JPG
shapes don't have text. However, other custom symbols
that I can envision may have text in other shapes that I
don't want edited.
So again, how do I test the value of a shape's text
box "LockTextEdit" property?
box "LockTextEdit" property?
I have grouped 2 shapes (a graphics JPG file and a
rectangle drawn in VISIO) to form a custom shape. I want
the text box to show up in the rectangle so I have
protected the text boxes for the group and the JPG so
that changes to text in these shapes are not allowed.
However, I want to find the text that was entered into
the rectangle's text box, since that text identifies the
use of the symbol on the flow diagram.
I use code similar to the following where "visShape" is
the shape object discussed above:
Dim aShp as Visio.Shape
For Each aShp In visShape.Shapes
If Not aShp.Cells("LockTextEdit") then
' Do something here
End If
Next aShp
However, aShp.Cells("LockTextEdit") always returns a "0"
for false--i.e. the shape's text box is not protected.
This is true for the 3 shape's (the group, the JPG, and
the rectangle). I've also tried
aShp.Cells.CellsSRC(visSectionObject, visRowLock,
visLockTextEdit)
with similar results.
I currently work around this by testing for the length of
the text in each of the shapes because the group and JPG
shapes don't have text. However, other custom symbols
that I can envision may have text in other shapes that I
don't want edited.
So again, how do I test the value of a shape's text
box "LockTextEdit" property?