View Single Post
  #4   Report Post  
Posted to microsoft.public.excel.programming
Jon Peltier Jon Peltier is offline
external usenet poster
 
Posts: 6,582
Default VBA Grouping Rectangle/Text Boxes


Unfortunately you cannot use syntax like
Shapes("Group 7").GroupItems("Rectangle 4")


you can do this -

For Each shp in activesheet/chart.Shapes("Group 7").GroupItems
if shp.name = "Rectangle 4" then
etc, eg
shp.fill.forecolor.schemecolor = 6 + 7


I've gotten into the habit of looping with a counter:

For iItem = 1 to blah.Shapes("Group 7").GroupItems.Count
Set shp = blah.Shapes("Group 7").GroupItems(iItems)

because sometimes it seems that For Each misses one or two items.

Unfortunately, like you, I have never found a way of changing text in a
grouped shape without first ungrouping, font formats neither.


Glad it's not just me.

- Jon
-------
Jon Peltier, Microsoft Excel MVP
Tutorials and Custom Solutions
Peltier Technical Services, Inc. - http://PeltierTech.com
_______