IEventLinelist

Defines the public contract for the EventLinelist class, exposing methods to handle workbook-level events in the output linelist workbook: sheet change, deactivate, selection change, double-click, filter table updates, and list-auto dropdown maintenance.

Depends on: ILLTranslation, ITranslationObject, IHiddenNames, IDropdownLists, ILLGeo, ILLdictionary, ILLVariables, IPasswords, ICustomTable

Lifecycle

Configure #

Configure the service with its host workbook context.

Signature:

Public Sub Configure(ByVal hostBook As Workbook)

Binds the service to a host workbook and resets all cached helpers. Must be called once before any event handler.

Parameters:

  • hostBook: Workbook. The linelist workbook providing data and infrastructure.

Workbook events

OnWorkbookOpen #

React to workbook open notifications.

Signature:

Public Sub OnWorkbookOpen()

Sets keyboard shortcuts, disables stale value formatting, and applies the initial workbook configuration (calculation mode, etc.).


OnSheetChange #

Handle worksheet change events fired by Excel.

Signature:

Public Sub OnSheetChange(ByVal sh As Worksheet, ByVal target As Range)

Inspects the sheet type tag (cell C1) and dispatches to the appropriate handler: HList value change (geo cascades, editable labels, list-auto, go-to-section, header protection, multiple choices), VList value change, or analysis value change (go-to-section, spatial table dispatch).

Parameters:

  • sh: Worksheet. The worksheet raising the change event.
  • target: Range. The edited cells.

OnSheetDeactivate #

Handle worksheet deactivation events.

Signature:

Public Sub OnSheetDeactivate(ByVal prevSheetName As String)

When the deactivated sheet had list-auto updates pending (flagged via RNG_UpdateListAuto hidden name), triggers the list-auto refresh and clears the flag.

Parameters:

  • prevSheetName: String. Name of the sheet that was deactivated.

OnSelectionChange #

Handle selection change events on HList sheets.

Signature:

Public Sub OnSelectionChange(ByVal sh As Worksheet, ByVal target As Range)

Updates geo dropdown validation lists based on the selected cell's geo control tag. When the selection is on the last row of the ListObject, automatically adds rows.

Parameters:

  • sh: Worksheet. The worksheet where the selection changed.
  • target: Range. The newly selected cell(s).

OnDoubleClick #

Handle double-click events on analysis sheets.

Signature:

Public Sub OnDoubleClick(ByVal sh As Worksheet, ByVal target As Range)

When the double-clicked cell is on a spatio-temporal analysis sheet and falls within an INPUTSPTGEO or INPUTSPTHF named range, opens the geo form for the corresponding type.

Parameters:

  • sh: Worksheet. The worksheet where the double-click occurred.
  • target: Range. The double-clicked cell.

Auxiliary operations

UpdateFilterTables #

Update filter tables used by analysis sheets.

Signature:

Public Sub UpdateFilterTables(Optional ByVal calculate As Boolean = True)

Copies visible HList data to corresponding filtered sheets. Optionally recalculates the active analysis sheet afterwards.

Parameters:

  • calculate: Optional Boolean. When True (default), recalculates the active sheet after updating.

UpdateAllListAuto #

Update all list-auto dropdowns across all HList sheets.

Signature:

Public Sub UpdateAllListAuto()

Iterates all worksheets in the workbook, and for each HList sheet, scans columns tagged as list_auto_origin and refreshes their dropdown validation lists with unique values from the data column.


ResetCaches #

Clear cached resources so they are lazily rebuilt on demand.

Signature:

Public Sub ResetCaches()

Clears all lazily-cached domain managers so they are rebuilt from scratch on the next access.