Range.Ungroup Method

Promotes a range in an outline (that is, decreases its outline level).

Namespace:  Microsoft.Office.Interop.Excel
Assembly:  Microsoft.Office.Interop.Excel (in Microsoft.Office.Interop.Excel.dll)

Syntax

'Declaration
Function Ungroup As Object
'Usage
Dim instance As Range
Dim returnValue As Object

returnValue = instance.Ungroup()
Object Ungroup()

Return Value

Type: System.Object

Remarks

The specified range must be a row or column, or a range of rows or columns. If the range is in a PivotTable report, this method ungroups the items contained in the range.

If the active cell is in a field header of a parent field, all the groups in that field are ungrouped and the field is removed from the PivotTable report. When the last group in a parent field is ungrouped, the entire field is removed from the report.

See Also

Reference

Range Interface

Range Members

Microsoft.Office.Interop.Excel Namespace