Edit form design
xlide_edit_formModify an Office form design: add or remove controls or set control properties, then save the file. Works for UserForms and Access forms.
Instructions
Changes one form's design and saves the file: add a control, remove one, or set a property on one. Geometry is in points for a UserForm and twips for an Access design. Setting a property to null clears it, putting the control back at its default. Removing a container takes its children with it, so ask the user first. Adding a control does not write its event procedure; do that with xlide_write_module on the form's code module.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| top | No | For add_control. | |
| left | No | For add_control. | |
| width | No | 0 uses the type's default. | |
| action | Yes | 'add_control', 'remove_control' or 'set_property'. | |
| height | No | 0 uses the type's default. | |
| caption | No | For add_control on an Access design: the control's caption. | |
| section | No | For add_control on an Access design: the band to put it in, such as Detail, PageHeaderSection or PageFooterSection. xlide_list_forms names the ones a design has. Ignored for a UserForm, which has no bands. | |
| container | No | For add_control: the Frame or page to put it in. | |
| file_path | Yes | Absolute path to the Office file. | |
| form_name | Yes | Form to change. | |
| control_name | Yes | The control to add, remove or change. | |
| control_type | No | For add_control: Label, TextBox, CommandButton, CheckBox, OptionButton, ComboBox, ListBox, Frame, MultiPage, Image, SpinButton and the rest. | |
| property_name | No | For set_property: the property to set. | |
| property_value | No | For set_property. null clears it to the default. | |
| allow_protected | No | Permit saving a password-protected VBA project. Set true only after the user agrees. | |
| allow_invalidate_signature | No | Permit saving a change that removes the VBA project's digital signature, where applicable. Set true only after the user agrees. |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
No arguments | |||