Export (0) Print
Expand All

How to: Delete NamedRange Controls at Design Time

Note Required applications

The features in this topic are available only if you have the required applications installed.

For more information, see Features Available by Product Combination.

  • One of these development environments:

    VSTO 2005

    -or-

    Visual Studio Team System

  • Microsoft Office 2003

You can delete most host controls in the same way you delete Windows Forms controls, by selecting the control and pressing the DELETE key. You cannot delete NamedRange controls with the DELETE key because there is no visual representation of the control on the worksheet, and the function of the DELETE key on selected cells is to delete the text within the cells. In Microsoft Office Excel 2003, you must use the Excel Define Name dialog box to delete the NamedRange controls.

NoteNote

If you delete a NamedRange control from a worksheet that is not the active worksheet in the designer, the auto-generated code might not be removed from your project and build errors might occur. Always select the worksheet that contains the NamedRange control to make it the active worksheet before deleting the control.

To delete a NamedRange control

  1. Right-click a NamedRange control.

  2. Select Manage Named Ranges on the shortcut menu.

    The Define Name dialog box opens.

  3. Select the named range you want to delete, and click Delete.

  4. Click Close to close the dialog box.

See Also

Community Additions

ADD
Show:
© 2014 Microsoft