[]
Determines whether name is contained in INames.
Use this method to check whether the collection already includes a defined name before retrieving it with this[string] or adding a new one.
bool Contains(string name)
Function Contains(name As String) As Boolean
| Type | Name | Description |
|---|---|---|
| string | name | The name. |
| Type | Description |
|---|---|
| bool | Whether iNames contains the name. |
INames names = workbook.Names;
names.Add("SalesRange", "=Sheet1!$A$1:$A$5");
bool contains = names.Contains("SalesRange");