View Single Post
  #1   Report Post  
Posted to microsoft.public.excel.programming
Lance Hoffmeyer[_3_] Lance Hoffmeyer[_3_] is offline
external usenet poster
 
Posts: 8
Default VBA Grouping Rectangle/Text Boxes

Hey all,

I am trying to label a couple of text boxes that are grouped together within
a rectangle.


ActiveChart.Shapes("Group 29").Select
Selection.ShapeRange.Ungroup.Select
ActiveChart.PlotArea.Select
ActiveChart.Shapes("Group 28").Select
Selection.ShapeRange.Ungroup.Select
ActiveChart.PlotArea.Select
ActiveChart.Shapes("Text Box 17").Select
Selection.Characters.Text = Sheets(Idx + 1).Range("D16")
ActiveChart.Shapes("Text Box 18").Select
Selection.Characters.Text = Sheets(Idx + 1).Range("E16")
Selection.ShapeRange.Regroup.Select
ActiveChart.Shapes("Rectangle 13").Select
Selection.ShapeRange.Regroup.Select


Unfortunately, the GROUP ID changes each time I regroup so that what says
"Group 29" now becomes "Group 30"? Any work around for this?

Lance