Trying Assign macro to toolbar causes application error.
Below is the sequence of actions before the error occurred.
Tools → Customize, Toolbars tab.
Category: Macros (at the bottom of the list)
… and now the file is being closed due to an error.
Version: 7.3.7.2 / LibreOffice Community
Build ID: 30(Build:2)
CPU threads: 4; OS: Linux 5.15; UI render: default; VCL: gtk3
Locale: pl-PL (pl_PL.UTF-8); UI: pl-PL
Ubuntu package version: 1:7.3.7-0ubuntu0.22.04.6
Calc: threaded