Contact

LibreOffice Calc · Form controls · Intermediate

Link a Checkbox to a Model Input in LibreOffice Calc

Connect a form checkbox to a dedicated Boolean cell, use it in a calculation, and diagnose design mode, text reference values and broken links.

LibreOffice 26.8 Help-backed controls; independent model checks; native verification pending · Editorial standards

Make a checkbox control an optional packing cost in a fictional quote. The checkbox is a form object linked to a cell, not a typed tick symbol, a validation list or a macro button. This exercise requires no database, account, extension or macro.

Scope: free desktop Calc, English standard menus on Windows/Linux, based on Help labeled 26.8, checked 21 October 2026. Native interaction, save/reopen and screenshots were unavailable. The calculated amounts below were checked independently; follow the interaction checks in your installed build before adopting the workbook.

Build the calculation before adding the control

Create an ODS workbook with one sheet named Quote. Enter:

Cell Label or value
A1 Packing option model
A2 Units
B2 8
A3 Unit price
B3 12.5
A4 Packing charge
B4 6
A6 Include packing?
B6 =FALSE()
A8 Total
B8 =B2*B3+IF(B6;B4;0)

Use your locale’s formula separator if needed. The false state gives 100; temporarily replace B6 with =TRUE() and expect 106. These are cost-model checks, not tax or commercial pricing advice.

Before linking a control, replace B6 with the numeric constant 0. It is now a dedicated, writable input cell. Do not put an important formula there: clicking the control will write to its linked cell. Leave B8 as the output formula. Save a checkpoint.

Insert and configure a checkbox

  1. Open View → Toolbars → Form Controls. Turn Design Mode on so you can create and edit controls.
  2. Choose Check Box and drag a small control in an empty area, for example beside D2. Keep it clear of the input and result cells.
  3. Right-click the new object and choose Control Properties. On General, give it a recognizable name such as IncludePacking and a visible label Include packing charge.
  4. If Tristate is available, set it to No. This model has only included/not included states.
  5. On Data, set Linked cell to $Quote.$B$6. Leave Reference value (on) and Reference value (off) empty so the control uses Boolean states, not text labels. Do not configure a database source or event macro.
  6. Close Properties and turn Design Mode off. Now use the checkbox rather than trying to resize it.

Form Controls Help documents creating controls, opening their properties and switching between design and use. The Data tab documents the linked-cell behavior and the different result when reference text is configured.

Verify both states in the cell, not just the picture

Click until the box is clearly unchecked. B6 should show FALSE, and B8 should be 100. Check it: B6 should show TRUE, and B8 should become 106. Uncheck it again and confirm 100.

Set B2 to 10 while unchecked: expect 125. Check the box: expect 131. Change B4 from 6 to 9 while checked: expect 134. Uncheck it: expect 125, because the charge is excluded rather than erased. Restore B2=8 and B4=6, then check again for 106.

The independent arithmetic is 8 × 12.5 = 100; 100 + 6 = 106; 10 × 12.5 = 125; 125 + 9 = 134. A checkbox that changes its appearance but leaves B6 unchanged is not successfully linked.

Separate editing the object from using it

Turn Design Mode on when you need to move the checkbox, edit its label or change its linked cell. Turn it off before testing the result. These are different operating modes; clicking an object selected for design does not prove it can update the model.

As a reverse-direction test, with Design Mode off, enter 0 into B6: the box should clear and total should become 100. Enter 1: the box should select and total should become 106. The linked-cell documentation describes numeric zero/nonzero synchronization. Do not treat arbitrary text such as Yes as a Boolean; this exercise deliberately avoids text reference values and a third state.

Troubleshooting and safe recovery

  • Click selects sizing handles: leave Design Mode before using the control.
  • Box changes but total does not: inspect B6, the exact linked-cell address and B8’s formula. A label naming B6 is not the same as the Data-tab link.
  • B6 contains words or an empty string: inspect both reference-value properties. Clear those entries for this Boolean model, then toggle off/on again and inspect the cell.
  • An undetermined state or error appears: check the control’s state options and B6’s contents. Reset B6 to 0, establish the false state and rerun both-state checks before trusting the total.
  • A needed formula disappeared: the linked cell was not an appropriate writable input. Restore the checkpoint and link a separate input cell instead.

Save as ODS, reopen and repeat the unchecked/checked test. Keep the ODS master: CSV cannot preserve the form object or model formulas. Do not infer checkbox portability to another spreadsheet program from this local design. For constrained typed entries instead, see data validity dropdowns.