![]() |
Determining the group a picture or textbox is a member of
If I select an item (picture or textbox) of a group how do
I determine what the group or group name the item is a member of? David |
Determining the group a picture or textbox is a member of
If the controls are grouped using Frame controls, you can use the Parent
property of the control to return the Frame that the control belongs to. Or, depending on how you have formed the groups, you can use the GroupName property of the control. -- Vasant "David Cuthill" wrote in message ... If I select an item (picture or textbox) of a group how do I determine what the group or group name the item is a member of? David |
Determining the group a picture or textbox is a member of
I'm sorry - I am refering to a picture or a label that is
inserted on a worksheet not a user form. The picture and label form a grouped image and I want to determine the group name if one of the grouped items is selected. David -----Original Message----- If the controls are grouped using Frame controls, you can use the Parent property of the control to return the Frame that the control belongs to. Or, depending on how you have formed the groups, you can use the GroupName property of the control. -- Vasant "David Cuthill" wrote in message ... If I select an item (picture or textbox) of a group how do I determine what the group or group name the item is a member of? David . |
Determining the group a picture or textbox is a member of
Do you mean labels from the Forms toolbox which have been subsequently
grouped? These labels are Shape objects and have a GroupItms which returns their respective GroupShapes collection, but this collection object doesn't have a Name property. How did you set the group's name originally? -- "David Cuthill" wrote in message ... I'm sorry - I am refering to a picture or a label that is inserted on a worksheet not a user form. The picture and label form a grouped image and I want to determine the group name if one of the grouped items is selected. David -----Original Message----- If the controls are grouped using Frame controls, you can use the Parent property of the control to return the Frame that the control belongs to. Or, depending on how you have formed the groups, you can use the GroupName property of the control. -- Vasant "David Cuthill" wrote in message ... If I select an item (picture or textbox) of a group how do I determine what the group or group name the item is a member of? David . |
Determining the group a picture or textbox is a member of
Sorry, not sure how to do that. Is this a real group that Excel recognizes,
or just what you consider to be a group? What were the mechanics of the grouping process? -- Vasant "David Cuthill" wrote in message ... I'm sorry - I am refering to a picture or a label that is inserted on a worksheet not a user form. The picture and label form a grouped image and I want to determine the group name if one of the grouped items is selected. David -----Original Message----- If the controls are grouped using Frame controls, you can use the Parent property of the control to return the Frame that the control belongs to. Or, depending on how you have formed the groups, you can use the GroupName property of the control. -- Vasant "David Cuthill" wrote in message ... If I select an item (picture or textbox) of a group how do I determine what the group or group name the item is a member of? David . |
Determining the group a picture or textbox is a member of
I create the group using code.
I insert a picture into the worksheet (activesheet.picture.insert ...) and then create a textbox (activesheet.shapes.addlabel ...) in close proximity to the inserted picture. I then select the two items and group them by using ... ActiveSheet.Shapes.Range(Array(PictName, LabelName)).Select Selection.ShapeRange.Group.Select I then name the group using a preselected naming convention. What I want to be able to do is when either of the grouped items is selected (which results in the name of the item being displayed in the name box on the left hand side of the formula bar) is determine, using code, which group the selected item belongs to. I have tried using things like Parent and GroupName but I can't seem to get it work as appears that I am not applying it to the correct object. David -----Original Message----- Sorry, not sure how to do that. Is this a real group that Excel recognizes, or just what you consider to be a group? What were the mechanics of the grouping process? -- Vasant "David Cuthill" wrote in message ... I'm sorry - I am refering to a picture or a label that is inserted on a worksheet not a user form. The picture and label form a grouped image and I want to determine the group name if one of the grouped items is selected. David -----Original Message----- If the controls are grouped using Frame controls, you can use the Parent property of the control to return the Frame that the control belongs to. Or, depending on how you have formed the groups, you can use the GroupName property of the control. -- Vasant "David Cuthill" wrote in message ... If I select an item (picture or textbox) of a group how do I determine what the group or group name the item is a member of? David . . |
Determining the group a picture or textbox is a member of
I believe I have figured it out ... after much searching.
ActiveSheet.Shapes(PictName).ParentGroup.Name gives me the name of the group the shape belongs to. Thanks -----Original Message----- Sorry, not sure how to do that. Is this a real group that Excel recognizes, or just what you consider to be a group? What were the mechanics of the grouping process? -- Vasant "David Cuthill" wrote in message ... I'm sorry - I am refering to a picture or a label that is inserted on a worksheet not a user form. The picture and label form a grouped image and I want to determine the group name if one of the grouped items is selected. David -----Original Message----- If the controls are grouped using Frame controls, you can use the Parent property of the control to return the Frame that the control belongs to. Or, depending on how you have formed the groups, you can use the GroupName property of the control. -- Vasant "David Cuthill" wrote in message ... If I select an item (picture or textbox) of a group how do I determine what the group or group name the item is a member of? David . . |
All times are GMT +1. The time now is 10:02 PM. |
Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
ExcelBanter.com