I have a Calc spreadsheet on which I have used Form Design mode to add a Push-Button control to a sheet. Using the General tab of the Control’s Properties, I have assigned text to the button’s Label property. On the Control’s Properties Events tab, I have assigned a Basic Macro to be executed when the button is clicked. The macro code resides in the Standard Module of the spreadsheet itself (i.e. NOT in the My Macros Module.) When I click the button, the macro code is executed as desired.
I would like the Basic code in the Macro to be able, in some cases, to change the Button’s Label text and to be able to change its Enabled Property to “No” but I have not been able to find any documentation anywhere that provides guidance on how to access Form Controls such as the Push-Button when those controls exist directly on a sheet. Everything I have found assumes the Controls exist within a Dialog and describe how to access the Control through the Dialog and its associated Form. I do not want or need the complexity of a Dialog/Form. Can anyone provide an Example of LibreOffice Basic macro code that can access such a Control? Or provide link(s) to documentation that might help?
Chucko