ISetupPreparation

Defines the public contract for the SetupPreparation class, exposing methods to bind a preparation helper to a workbook, execute the full preparation workflow (dropdowns, updated values registry, validations, hidden/protected sheets), and access the resulting dropdown manager and update watcher objects.

Depends on: IDevelopment, IDropdownLists, IUpdatedValues

Lifecycle

Configure #

Bind the preparation helper to a workbook hosting setup worksheets

Signature:

Public Sub Configure(ByVal hostBook As Workbook)

Stores the workbook reference and resets cached worksheet and manager objects. Must be called before any other method or property on this instance.

Parameters:

  • hostBook: Workbook. The workbook owning the setup assets.

Prepare #

Execute the full preparation workflow

Signature:

Public Sub Prepare(ByRef manager As IDevelopment)

Runs the complete preparation sequence: registers all dropdown list objects, initialises the updated values registry, applies data validations to setup tables (Dictionary, Exports, Analysis), and ensures hidden and protected sheet configuration via the supplied development manager.

Parameters:

  • manager: IDevelopment. Development manager providing hidden/protected sheet registration.

Operations

EnsureDropdowns #

Ensure dropdown list objects exist with the expected default entries

Signature:

Public Sub EnsureDropdowns()

Creates the dropdown manager if needed, then registers all standard dropdown lists (yes/no, formats, variable types, etc.) on the dropdown worksheet. Safe to call multiple times; subsequent calls are no-ops when the manager is already initialised.


EnsureUpdatedRegistry #

Initialise the updated values registry and register watched tables

Signature:

Public Sub EnsureUpdatedRegistry()

Creates the update watcher if needed, clears any existing registry data, registers the watched setup sheets (Dictionary, Choices, Analysis, Exports), and resets all status tags to their default values.


State

Dropdown manager created during preparation

Signature:

Public Property Get Dropdowns() As IDropdownLists

Returns the IDropdownLists manager bound to the dropdown worksheet. Lazily initialises the manager on first access if it was not already created by EnsureDropdowns or Prepare.

Returns: IDropdownLists. The dropdown manager instance.


UpdatedWatcher #

Updated values watcher created during preparation

Signature:

Public Property Get UpdatedWatcher() As IUpdatedValues

Returns the IUpdatedValues watcher bound to the registry worksheet. Lazily initialises the watcher on first access if it was not already created by EnsureUpdatedRegistry or Prepare.

Returns: IUpdatedValues. The update watcher instance.


HostWorkbook #

Workbook hosting the setup worksheets

Signature:

Public Property Get HostWorkbook() As Workbook

Returns the workbook reference stored during Configure. Raises an error when the instance has not been configured.

Returns: Workbook. The bound workbook.