ILLFormat

Defines the public contract for the LLFormat class, exposing design-driven formatting of worksheets, ranges, shapes, and other Excel objects. Reads style metadata from a format table and applies it according to FormatScope constants. Supports import/export of format definitions across workbooks.

Formatting

ApplyFormat #

Apply a design-driven format to an Excel object

Signature:

Public Sub ApplyFormat(formattingObject As Variant, ByVal scope As Byte, _
                       Optional ByVal nbDecimals As Integer = 0)

Core formatting operation. Reads style metadata from the format table and applies it to the supplied object (Worksheet, Range, Shape, ListObject, or Characters) according to the given FormatScope constant.

Parameters:

  • formattingObject: Variant. The Excel object to format.
  • scope: Byte. FormatScope constant selecting the visual pattern.
  • nbDecimals: Integer. Decimal count for numeric formatting. Defaults to 0.

Design Lookups

DesignValue #

Look up a design value or colour from the format table

Signature:

Public Function DesignValue(ByVal labelName As String, _
                            Optional ByVal returnedColor As Boolean = True) As Variant

Retrieve raw style values from the format table. Retrieves either the fill colour (Interior.Color) or the raw cell value for the specified label row under the active design column.

Parameters:

  • labelName: String. Label text identifying the row in the format table.
  • returnedColor: Boolean. When True returns Interior.Color; otherwise returns the raw value. Defaults to True.

Returns: Variant. The colour (Long) or cell value.


DataExchange

Import #

Import formatting definitions from another worksheet

Signature:

Public Sub Import(ByVal inpsh As Worksheet)

Import and export format definitions. Reads design columns from the source worksheet and merges them into the current format table. Updates the active design name from the source DESIGNTYPE named range.

Parameters:

  • inpsh: Worksheet. Source worksheet containing the format table.

Export #

Export the format table to another workbook

Signature:

Public Sub Export(ByVal toWkb As Workbook)

Copies the format table and cell styles to a new worksheet in the destination workbook. When the target worksheet already exists, imports from it instead.

Parameters:

  • toWkb: Workbook. Destination workbook.

Checkings

HasCheckings #

Whether the format object has logged diagnostic messages

Signature:

Public Property Get HasCheckings() As Boolean

Diagnostic logging access. Returns True when at least one diagnostic entry has been recorded, typically for missing labels in the format table.

Returns: Boolean. True when diagnostic entries exist.


CheckingValues #

Retrieve the diagnostic log entries

Signature:

Public Property Get CheckingValues() As IChecking

Returns the internal IChecking object containing all logged messages. Returns Nothing when no entries have been recorded.

Returns: IChecking. The checking instance, or Nothing.