Home |
Search |
Today's Posts |
|
#1
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
Is that possible to refer to an object in a group
ActiveSheet.Shapes("group_3"...?..."rectangle_4"). Select or ActiveSheet.Shapes("group_7"...?..."textbox_3").Te xt= "abc" thanks |
#2
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
Hi,
You can access a shape within a group but not by name. You have to use a numeric index. The following should help. Add 3 rectangles to the active sheet and then group them. '--------------------------- Sub X() Dim shpGroup As Shape Dim shpTemp As Shape ' Set shpGroup = ActiveSheet.Shapes(1) If shpGroup.Type = msoGroup Then For Each shpTemp In shpGroup.GroupItems Debug.Print "Grouped shape ", shpTemp.Name Next With shpGroup.GroupItems(1) .Fill.ForeColor.RGB = RGB(0, 255, 0) End With Else ' normal ungrouped shape Debug.Print "Shape ", shpGroup.Name End If End Sub '--------------------------- Cheers Andy Linda Edlund wrote: Is that possible to refer to an object in a group ActiveSheet.Shapes("group_3"...?..."rectangle_4"). Select or ActiveSheet.Shapes("group_7"...?..."textbox_3").Te xt= "abc" thanks |
#3
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
Thank you for the answer Andy
|
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
Possible to refer to a sheet's object name ? | Excel Worksheet Functions | |||
make camera object refer to dynamic range | Excel Discussion (Misc queries) | |||
Refer to controls by group name. | Excel Programming | |||
Formula1 Property of Validation Object to refer to function name | Excel Programming | |||
More then 1 Excel object running at same time , how can I refer to right one in code? | Excel Programming |