NativeExcel for .Net Developer's Reference

IName.DeleteMethod

Deletes the specified defined name.

[Visual Basic]
SubDelete()
[C#]
voidDelete();
[C++]
voidDelete();
[JScript]
functionDelete();

Example

This example deletes the first defined name from the worksheet one.

[C#]
INames names = Workbook.Worksheets[1].Names;
if (names.Count > 0) names[1].Delete();
[VisualBasic]
Dim names As INames = Workbook.Worksheets(1).Names
If names.Count > 0 Then
   names(1).Delete()
End If 
[C++]
INames* names = Workbook->Worksheets->Item[1]->Names;
if (names->Count > 0) 
   names->Item[1]->Delete();

See Also

IName Interface | NativeExcel Namespace