Version

Scope Property

Gets the scope of the named reference.
Syntax
'Declaration
 
Public ReadOnly Property Scope As Object
public object Scope {get;}

Property Value

The scope of the named reference.
Remarks

This can either be the workbook which the named reference belongs to or one of the worksheets in the workbook.

The scope determines how formulas need to preface a name in order to use the named reference.

If the scope is the workbook, formulas in any cell in the workbook can reference the named reference by specifying just the name or the workbook's file name, an exclamation point, and the name:

  • =MyWorkbookName
  • ='C:\MyWorkbook.xls'!MyWorkbookName
When cells in other workbook's want to reference the named reference, they must use the second format by first specifying the file name when the workbook-scoped named reference exists.

If the scope is a worksheet, formulas in cells of the worksheet can reference the named reference by specifying just the name. In addition, they can fully qualify the named reference with the worksheet name and, optionally, the workbook file name:

  • =MyWorksheetName
  • =Sheet1!MyWorksheetName
  • ='C:\[MyWorkbook.xls]Sheet1'!MyWorksheetName
Formulas in cells of other worksheets in the same workbook can use the named reference as well, but they must specify the worksheet name and, optionally, the workbook file name:
  • =Sheet2!OtherWorksheetName
  • ='C:\[MyWorkbook.xls]Sheet2'!OtherWorksheetName
Formulas in cells of other workbooks can also used the named reference, but they must specify the workbook file name, worksheet name, and named reference name.

Requirements

Target Platforms: Windows 10, Windows 8.1, Windows 8, Windows 7, Windows Server 2012, Windows 7, Windows Vista SP1 or later, Windows XP SP3, Windows Server 2008 (Server Core not supported), Windows Server 2008 R2 (Server Core supported with SP1 or later), Windows Server 2003 SP2

See Also