ShapeRange.Ungroup Method
Ungroups any grouped shapes in the specified shape or range of shapes. Disassembles pictures and OLE objects within the specified shape or range of shapes. Returns the ungrouped shapes as a single ShapeRange object.
Namespace: Microsoft.Office.Interop.Excel
Assembly: Microsoft.Office.Interop.Excel (in Microsoft.Office.Interop.Excel.dll)
Syntax
'Declaration
Function Ungroup As ShapeRange
'Usage
Dim instance As ShapeRange
Dim returnValue As ShapeRange
returnValue = instance.Ungroup()
ShapeRange Ungroup()
Return Value
Type: Microsoft.Office.Interop.Excel.ShapeRange
Remarks
Because a group of shapes is treated as a single object, 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.