title: Changing colors of a group of shapes without selecting (fill & text)
body: <p>With regard to the following code:</p>
  <pre><code>Sub Macro1 ()
     With ActiveSheet.Shapes.Range(Array(&quot;MyShapeGroup&quot;)) 
       .Fill.ForeColor.RGB = cPurp  ''cPurp is global constant
       .TextFrame.Characters.Font.ColorIndex = 2
     End With
  End Sub
  </code></pre>
  <p>I can execute the macro with only the change to the fill color, however, when I add in the text color change I get an Application-defined or object-defined error.</p>
  <p>So I tried this:</p>
  <pre><code>Sub Macro1()
      With ActiveSheet.Shapes.Range(Array(&quot;MyShapeGroup&quot;)).ShapeRange
         .Fill.ForeColor.RGB = cPurp
         .TextFrame.Characters.Font.ColorIndex = 2
      End With
  End Sub
  </code></pre>
  <p>Which throws an 'Object doesn't support this property or method' on the <code>With</code> line.</p>
  <p>Also tried this:</p>
  <pre><code>Sub Macro1()
      With ActiveSheet.Shapes.Range(Array(&quot;MyShapeGroup&quot;))
         .Fill.ForeColor.RGB = cPurp
         .ShapeRange.TextFrame.Characters.Font.ColorIndex = 2
      End With
  End Sub
  </code></pre>
  <p>Which throws another 'Object doesn't support this property or method' on the <code>.ShapeRange</code> line.</p>
  <p>Also tried this:</p>
  <pre><code>Sub Macro1 ()
      ActiveSheet.Shapes.Range(Array(&quot;MyShapeGroup&quot;)).Select
      With Selection.ShapeRange
          .Fill.ForeColor.RGB = cPurp ''cPurp is global constant
          .TextFrame.Characters.Font.ColorIndex = 2
      End With
  End Sub
  </code></pre>
  <p>How can I efficiently do both the fill color change and the text color change without using a select?</p>
  <hr />
  <p>Updated with working method (tested in and Excel 2010 &amp; Excel in Office365):</p>
  <pre><code>Option Explicit
  
  Sub test()
          With ActiveSheet.Shapes.Range(Array(&quot;MyShapeGroup&quot;))
              .Fill.ForeColor.RGB = RGB(255, 255, 0)
              .TextFrame2.TextRange.Font.Fill.ForeColor.RGB = RGB(0, 255, 255)
          End With
  End Sub
  </code></pre>