How to: Clear Groups in Worksheets
Some code examples in this topic use the this or Me keyword or the
If you have groups of ranges in a Microsoft Office Excel 2003 worksheet, you can ungroup them using themethod.
The range can be one of two types:
Native Excel object.
Excel Microsoft.Office.Interop.Excel.Range objects do not have events or data binding capabilities.
Using Host Controls
The following code example assumes you have three previously grouped Microsoft.Office.Tools.Excel.NamedRange controls in a worksheet:
To clear groups of NamedRange controls in a worksheet
Using Excel Objects
This code example assumes you have programmatically added and grouped three native Excel ranges in the worksheet:
To clear groups of Excel Ranges in a worksheet
Compiling the Code
This code must be placed in a sheet class, not in the