Note
Access to this page requires authorization. You can try signing in or changing directories.
Access to this page requires authorization. You can try changing directories.
Applies to |
---|
The information in this topic applies only to the specified Visual Studio Tools for Office projects and versions of Microsoft Office. Project type
Microsoft Office version
For more information, see Features Available by Application and Project Type. |
If you have groups of NamedRange controls or native Excel range objects in a worksheet, you can ungroup them..
The following code example assumes you have three previously grouped Microsoft.Office.Tools.Excel.NamedRange controls in a worksheet: data2001, data2002, and dataAll.
Call the Ungroup method. This code must be placed in a sheet class, not in the ThisWorkbook class.
With Me .data2001.Ungroup() .data2002.Ungroup() .dataAll.Ungroup() End With
this.data2001.Ungroup(); this.data2002.Ungroup(); this.dataAll.Ungroup();
This code example assumes you have programmatically added and grouped three native Excel ranges in the worksheet: data2001, data2002, and dataAll.
Call the Ungroup method.
With Me.Application .Range("data2001").Ungroup() .Range("data2002").Ungroup() .Range("dataAll").Ungroup() End With
this.Application.get_Range("data2001", missing).Ungroup(); this.Application.get_Range("data2002", missing).Ungroup(); this.Application.get_Range("dataAll", missing).Ungroup();
How to: Create Groups in Worksheets
The Variable missing and Optional Parameters in Office Solutions