Get Cell information from a subshape in a shape

M

Marcus Mängel

Hello,

I created a masteshape with several shapes inside. In two of these shapes is
text included.
I would like to change the text in these shape after the a new shape is
placed in the active sheet. How do I can I adress the subshape to change
this text with vba.

Thanks for Your help

Marcus
 
S

sureshsa_2000

Hi
The answer is

strText = shpObj.Text
iCharBegin = 0
iCharEnd = InStr(strText, Chr(10))
Set ovChars = shpObj.Characters
ovChars.Begin = 0
ovChars.End = iCharEnd -
 
M

Marcus Mängel

Hi,

thank you for your reply but this is not the answer to my question. I was
looking for the way to adress the subshape.
Tanks to Chris Roth I got the answer:
Here his example:
Dim shp as Visio.Shape, shpSub as Visio.Shape
Set shp = Visio.ActiveWindow.Selection(1)

For Each shpSub in shp.Shapes
Debug.Print shpSub.Text
' Oder:
' shpSub.Text = "Woohoo..."
Next shpSub


Marcus
 

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