MasterSetupPreparation
Internal members (not exported)
Factory helpers
Create #
Signature:
Public Function Create(ByVal hostBook As Workbook) As IMasterSetupPreparation
("Create a configured MasterSetupPreparation instance for the supplied workbook.")
Self #
Signature:
Public Property Get Self() As IMasterSetupPreparation
("Return the current instance as an interface reference.")
Public API
Configure #
Signature:
Public Sub Configure(ByVal hostBook As Workbook)
("Bind the preparation helper to the workbook hosting master setup assets.")
Prepare #
Signature:
Public Sub Prepare(Optional ByVal excelApplication As Application)
("Run the preparation workflow: register dropdowns then initialise the variables table.")
EnsureDropdowns #
Signature:
Public Sub EnsureDropdowns()
("Ensure the dropdown worksheet hosts all required dropdown lists.")
EnsureVariables #
Signature:
Public Sub EnsureVariables()
("Ensure the variables worksheet exposes an initialised manager with validations applied.")
Dropdowns #
Signature:
Public Property Get Dropdowns() As IDropdownLists
("Expose the dropdown manager for callers needing direct access.")
Variables #
Signature:
Public Property Get Variables() As IMasterSetupVariables
("Expose the variables manager associated with the master setup table.")
HostWorkbook #
Signature:
Public Property Get HostWorkbook() As Workbook
("Expose the configured host workbook.")
Preparation helpers
ResetCaches #
Signature:
Private Sub ResetCaches()
("Reset cached dependencies after reconfiguration.")
EnsureDropdownManager #
Signature:
Private Function EnsureDropdownManager() As IDropdownLists
("Ensure the dropdown manager is initialised and cached.")
EnsureVariablesManager #
Signature:
Private Function EnsureVariablesManager() As IMasterSetupVariables
("Ensure the variables manager is initialised over an existing listobject.")
EnsureDropdownSheet #
Signature:
Private Function EnsureDropdownSheet() As Worksheet
("Ensure the dropdown worksheet exists and cache the reference.")
EnsureVariablesSheet #
Signature:
Private Function EnsureVariablesSheet() As Worksheet
("Ensure the variables worksheet exists and cache the reference.")
EnsureVariablesTable #
Signature:
Private Function EnsureVariablesTable() As ListObject
("Ensure a variables table exists on the variables worksheet.")
ResolveVariablesTable #
Signature:
Private Function ResolveVariablesTable(ByVal wsVars As Worksheet) As ListObject
("Resolve the primary variables table if it already exists.")
CreateVariablesTable #
Signature:
Private Function CreateVariablesTable(ByVal wsVars As Worksheet) As ListObject
("Create a variables table with default headers when none exists.")
EnsureTableHasRow #
Signature:
Private Sub EnsureTableHasRow(ByVal table As ListObject)
("Ensure the supplied table exposes at least one data row.")
ApplyTableStyle #
Signature:
Private Sub ApplyTableStyle(ByVal table As ListObject, ByVal tableStyle As String)
("Apply a table style while ignoring styling errors on unsupported versions.")
DefaultVariableHeaders #
Signature:
Private Function DefaultVariableHeaders() As Variant
("Return the default header labels for a freshly created variables table.")
DefaultDropdownDefinitions #
Signature:
Private Function DefaultDropdownDefinitions() As Variant
("Supply the default dropdown definitions required by master setup.")
DefaultDiseaseExclusions #
Signature:
Private Function DefaultDiseaseExclusions() As Variant
("Return the default list of worksheets excluded from disease dropdowns.")
DefaultConfigSheets #
Signature:
Private Function DefaultConfigSheets() As Variant
("Return the default configuration worksheets list.")
EnsureDropdownDefinition #
Signature:
Private Sub EnsureDropdownDefinition(ByVal drop As IDropdownLists, _
ByVal listName As String, _
ByVal items As Variant)
("Ensure a dropdown definition exists with the supplied values.")
RefreshLanguageDropdowns #
Signature:
Private Sub RefreshLanguageDropdowns(ByVal drop As IDropdownLists)
("Populate the languages dropdowns using the translations sheet headers.")
BuildArray #
Signature:
Private Function BuildArray(ByVal items As Variant) As BetterArray
("Convert supplied items into a BetterArray helper.")
EnsureDropdownHasValues #
Signature:
Private Sub EnsureDropdownHasValues(ByVal drop As IDropdownLists, _
ByVal listName As String, _
ByVal values As BetterArray)
("Ensure a dropdown either exists or is updated with the supplied values.")
EnsureVariableNameColumnName #
Signature:
Private Sub EnsureVariableNameColumnName(ByVal manager As IMasterSetupVariables)
("Publish the Variable Name column range as a hidden workbook name for downstream formulas.")
ResolveWorksheet #
Signature:
Private Function ResolveWorksheet(ByVal sheetName As String) As Worksheet
("Resolve a worksheet by name without creating it.")
ResolveOrCreateWorksheet #
Signature:
Private Function ResolveOrCreateWorksheet(ByVal sheetName As String, _
Optional ByVal visibility As XlSheetVisibility = xlSheetVisible, _
Optional ByVal applyVisibility As Boolean = True) As Worksheet
("Resolve a worksheet or create it when absent.")
EnsureWorkbook #
Signature:
Private Function EnsureWorkbook() As Workbook
("Ensure the host workbook reference is available.")