Skip to main content

ShapeRange.Group method

Table of contents
  1. Syntax
  2. Return value
  3. Remarks

Groups the shapes in the specified range.



expression A variable that represents a ShapeRange object.

Return value

A Shape object that represents the grouped shape.


Because a group of shapes is treated as a single shape, grouping and ungrouping shapes changes the number of items in the Shapes collection and changes the index numbers of items that come after the affected items in the collection.

The Range object must be a single cell in the PivotTable field's data range. If you attempt to apply this method to more than one cell, it will fail (without displaying an error message).

Leave a comment

Your email address will not be published. Required fields are marked *

Format your code: <pre><code class="language-vba">place your code here</code></pre>