How to Run VBA in OpenOfficeby Chris Hoffman
OpenOffice includes limited support for Visual Basic for Applications (VBA) macros, which was first introduced in OpenOffice 3.0. VBA macros are commonly used with Microsoft Office and embedded in Excel spreadsheets. While OpenOffice doesn’t support all VBA features, it can run many macros with no modification required. All macros except signed macros from trusted sources are disabled in OpenOffice by default, so you’ll need to adjust your macro security settings before running VBA macros or any other type of macros.
Click the “Tools” menu at the top of the OpenOffice window and select “Options.”
Click “Security” under "OpenOffice.org" at the left side of the "Options" window.
Click the “Macro Security” button.
Select the “Medium” security level and click “OK” twice.
Click the “File” menu, click “Open,” navigate to a file containing a VBA macro and double-click it.
Click the “Enable Macros” button.
Use the file normally; OpenOffice automatically runs macros with no modification if it supports them. You can also try to run a specific macro in the file by clicking the “Tools” menu, pointing to “Macros,” selecting a VBA macro in the current file and clicking the “Run” button.
- check Update to a more recent version of OpenOffice or LibreOffice if your VBA macro doesn’t run. Newer versions may include bug fixes and support for additional VBA features.
- close Macros are a security risk and may contain viruses or other harmful code. Only run VBA macros from sources you trust.