Analyze VBA source
xlide_analyze_sourceRun static analysis on VBA source to catch compile errors before writing it to a file. Optionally pass a host or existing file path to resolve calls against the correct object model.
Instructions
Runs static analysis over VBA source you are holding, before it is written to a file. Use it to check code you have just generated: it costs nothing, needs no file, and catches the compile errors that would otherwise surface in front of the user. Pass host so the code is measured against the right object model, and file_path instead if the code is destined for a file that already exists, which resolves calls into the rest of that project.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| host | No | 'excel', 'word', 'powerpoint' or 'access'. Empty checks the language alone, with no host object model. | |
| kind | No | 'standard', 'class', 'document' or 'userform'. | standard |
| source | Yes | The VBA source to check. | |
| file_path | No | An existing Office file this module belongs to. Its other modules are analyzed alongside, so calls into them resolve. Overrides host. | |
| module_name | No | Name to report problems against. | Module1 |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
No arguments | |||