scripting form controls

Post Reply
Jcrey2255
Posts: 2
Joined: Fri Sep 04, 2020 9:45 pm

scripting form controls

Post by Jcrey2255 » Fri Sep 04, 2020 10:37 pm

I am trying to write basicMaker methods for form control objects placed within a planMaker sheet. Namely control buttons. The idea is to have a user open the worksheet and be able to click the buttons to perform methods that would be automated like choose an item from a drop list and it would filter the worksheet data accordingly, or use buttons to click to change the view using autofilter.

1. Is there a visible(accessible) Property or Object which I can use to point to the control?
2. How do I identify the Form objects on a worksheet so that I may assign scripts to them?
3. Is there a named event handler that I can use to script the button click event? (like On_Click or Status_changed or Mouse_click or ?)

I see that the control has a name variable in the properties dialog but there is no other functionality built into the dialog. Maybe just add a bit of code to look for activation events and allow a script to be assigned to run... [-o<

I would really like to love the software but if I cannot use the form controls with scripts at all.... it would be a major shortcoming. #-o [-X

SuperTech
SoftMaker Team
SoftMaker Team
Posts: 1415
Joined: Wed Mar 11, 2020 5:31 pm

Re: scripting form controls

Post by SuperTech » Sun Sep 06, 2020 8:04 am

Actually, PuchButtons provided in PlanMaker don't trigger any event or you can't attach any code/script with them as mentioned in the PlanMaker manual also as following:

Use the ribbon command Insert | group Objects | Form object | Pushbutton to insert a pushbutton.

Note: In PlanMaker, pushbuttons cannot be used to execute macros or VBA scripts; they are merely present for compatibility with Excel.

Currently, to run a BasicMaker script you can use the "Run script" button which is in the ribbon command File | Scripts group.

You can also use the User-defined button from customizing ribbon options but that will place them in PlanMaker permanently irrespective of file opened.

Thanks

Post Reply

Return to “PlanMaker 2021 for Windows”