Push button doesn't save the command

Hi. I’ve set a macro to “sort” a page and have created a “push button” to use. It works perfectly but when I save and close the libreoffice files, it saves the push button “general” part of the push button properties (so the button saves), but not the command to go to the macro in the “events” part of the push button properties (so the button just sits there and doesn’t sort the data).

I’m not sure if something else needs to be activated in order for it to save but it’s really aggravating…
Does anyone have any ideas please???

Toggle Mode

Just uncheck (deactivate) this button, save and reopen your workbook

Thank you for the reply but I was aware of this and it actually wasn’t the solution
I thought I would post the solution in case it puzzels anyone else.

I did by chance try it on another saved file and it worked. It was therefore a game of “spot the difference”.
The only difference was the file it wouldn’t save to was an “XLS” file and the one it worked on was “ODS”.
Therefore in conclusion it will only work with a file that’s .ODS