IHiddenNames
Defines the public contract for the HiddenNames class, exposing hidden worksheet/workbook-level name-value storage with typed serialization, metadata caching, discovery, and cross-scope import/export operations.
Introspection
Sheet #
Target worksheet reference
Signature:
Public Property Get Sheet() As Worksheet
Properties exposing the host and name existence checks. Returns the worksheet bound to this HiddenNames instance.
Returns: Worksheet. The host worksheet.
HasName #
Check whether a hidden name exists
Signature:
Public Function HasName(ByVal nameId As String) As Boolean
Determines whether the specified name is defined on the host scope.
Parameters:
nameId: String. Identifier of the hidden name.
Returns: Boolean. True when the name exists.
Discovery
ListNames #
Enumerate recorded hidden names
Signature:
Public Function ListNames(Optional ByVal prefix As String = vbNullString) As BetterArray
Enumerate tracked hidden names. Returns metadata for all tracked hidden names, optionally filtered by a case-insensitive prefix.
Parameters:
prefix: Optional String. Prefix filter. Defaults to vbNullString (all names).
Returns: BetterArray. Array of metadata records: Array(nameId, HiddenNameValueType, lastUpdated).
Synchronisation
ExportNames #
Export all tracked hidden names to another worksheet
Signature:
Public Sub ExportNames(ByVal targetSh As Worksheet, _
Optional ByVal prefix As String = vbNullString)
Import/export operations across worksheets and workbooks.
Parameters:
targetSh: Worksheet. Destination worksheet.prefix: Optional String. Prefix filter. Defaults to vbNullString.
ImportNames #
Import hidden names from another worksheet
Signature:
Public Sub ImportNames(ByVal sourceSh As Worksheet, _
Optional ByVal prefix As String = vbNullString, _
Optional ByVal overwriteExisting As Boolean = True)
Parameters:
sourceSh: Worksheet. Source worksheet providing the names.prefix: Optional String. Prefix filter. Defaults to vbNullString.overwriteExisting: Optional Boolean. When False, existing values are preserved. Defaults to True.
ExportNamesToWorkbook #
Export tracked names to another workbook scope
Signature:
Public Sub ExportNamesToWorkbook(ByVal targetWb As Workbook, _
Optional ByVal prefix As String = vbNullString)
Parameters:
targetWb: Workbook. Destination workbook.prefix: Optional String. Prefix filter. Defaults to vbNullString.
ImportNamesFromWorkbook #
Import hidden names from another workbook scope
Signature:
Public Sub ImportNamesFromWorkbook(ByVal sourceWb As Workbook, _
Optional ByVal prefix As String = vbNullString, _
Optional ByVal overwriteExisting As Boolean = True)
Parameters:
sourceWb: Workbook. Source workbook providing the names.prefix: Optional String. Prefix filter. Defaults to vbNullString.overwriteExisting: Optional Boolean. When False, existing values are preserved. Defaults to True.
SetListObjectHeader #
Create a workbook-level hidden name referencing a ListObject header
Signature:
Public Sub SetListObjectHeader(ByVal nameId As String, _
ByVal listObject As ListObject, _
ByVal headerName As String)
Adds or replaces a workbook-scoped hidden name whose RefersTo formula points at the specified ListObject column.
Parameters:
nameId: String. Identifier of the workbook name to assign.listObject: ListObject. Target ListObject hosting the header.headerName: String. Caption of the header column to reference.