Page 1 of 1

[Solved] Change properties of Calc Push Button using macro

Posted: Wed Dec 06, 2023 5:18 pm
by Nocton
On sheet named 'Sheet1', I have a Push Button named 'Switch' with Label 'ON' and font colour green. After the button's action is executed I want to change it to 'OFF' and Red.
What is the best way to do that?

Re: Change properties of Calc Push Button using macro

Posted: Wed Dec 06, 2023 6:32 pm
by Zizi64
Here is a sample file with an embedded macro.
ButtonProperties.ods
(10.14 KiB) Downloaded 524 times
Modified sample: I just deleted two helper Print commands.

Re: Change properties of Calc Push Button using macro

Posted: Wed Dec 06, 2023 8:06 pm
by Nocton
Thank you Zizi64 - a nice solution.