ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Programming (https://www.excelbanter.com/excel-programming/)
-   -   text in shape group (https://www.excelbanter.com/excel-programming/325150-text-shape-group.html)

pshen

text in shape group
 
Please help:

I grouped several shapes into a group, which contains a label. I want to
use this group shape as a template to dynamically duplicate it and assign a
different text to the label item inside the group shape.

for example, "Gshape" is group shape contains a label, a circle and a
rectangle.

the following will cause error:
Gshape.groupitems(1).TextFrame.Characters.Text = "new text"
(assuming item 1 is the label, this is known when you group the shapes)

Thanks.


--
pshen

Peter T

text in shape group
 
Hi pshen

The only way I have ever been able to change text in a group item shape is
first to ungroup. Change the text then regroup.

Regards,
Peter T


"pshen" wrote in message
...
Please help:

I grouped several shapes into a group, which contains a label. I want to
use this group shape as a template to dynamically duplicate it and assign

a
different text to the label item inside the group shape.

for example, "Gshape" is group shape contains a label, a circle and a
rectangle.

the following will cause error:
Gshape.groupitems(1).TextFrame.Characters.Text = "new text"
(assuming item 1 is the label, this is known when you group the shapes)

Thanks.


--
pshen




Wanderer

text in shape group
 
Hi pshen,
in your group you find "groupitems", and there are "item"s. And there you
find "name" for the textbox' name and "alternative text" for the text in the
box. But look at all in this attribute. Don't forgot "Textbox: " previous the
text.
regards, and excuse my terrible english
andre

"Peter T" wrote:

Hi pshen

The only way I have ever been able to change text in a group item shape is
first to ungroup. Change the text then regroup.

Regards,
Peter T


"pshen" wrote in message
...
Please help:

I grouped several shapes into a group, which contains a label. I want to
use this group shape as a template to dynamically duplicate it and assign

a
different text to the label item inside the group shape.

for example, "Gshape" is group shape contains a label, a circle and a
rectangle.

the following will cause error:
Gshape.groupitems(1).TextFrame.Characters.Text = "new text"
(assuming item 1 is the label, this is known when you group the shapes)

Thanks.


--
pshen






All times are GMT +1. The time now is 10:55 PM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
ExcelBanter.com