LibreOffice doesn't save VBA code, only xlsm

Creating a macro - Writing a Script - Using the API (OpenOffice Basic, Python, BeanShell, JavaScript)
Post Reply
jfca283
Posts: 8
Joined: Mon Jul 14, 2014 8:00 pm

LibreOffice doesn't save VBA code, only xlsm

Post by jfca283 »

Hi,
I saved a macro using xlsm and VBA.
The code worked, but after saving, closing, and opening the vba code was missing.
All the data inside the sheets was ok.
What can I do in order to save the sheet and the vba code?
I'm using linux (ubuntu)
Thanks for your time and interest.
Openoffice 4.1
Ubuntu
User avatar
Lupp
Volunteer
Posts: 3549
Joined: Sat May 31, 2014 7:05 pm
Location: München, Germany

Re: Libreoffice doesn't save vba code, only xlsm

Post by Lupp »

Your signature tells AOO V4.1 (third digit nissing), but your question is about LibreOffice?
Please edit your signature to get it consistent.

LibreOffice has limited support for VBA, and new versions may improve it even more.
However, VBA isn't a component of LibO (not to speak of AOO), and, of course, LibO (AOO) haven't full support for the badly documented "file formats" of MS (as they actually are, not as thei're published). Save to native formats.

(Consider that any commercial 'vendor' of software can't endure full compatibility with a free and open competitor. Incompatibility is their "raison d'être" - and they can enforce it.)

Amendment:
If you are decisive concerning the development of user code with VBA support, download the most recent version of LibreOffice,and study the modules in the Basic container "LibreOffice Macros" provided by the ScriptForge group. You may change your mind.
On Windows 10: LibreOffice 24.2 (new numbering) and older versions, PortableOpenOffice 4.1.7 and older, StarOffice 5.2
---
Lupp from München
JeJe
Volunteer
Posts: 2779
Joined: Wed Mar 09, 2016 2:40 pm

Re: Libreoffice doesn't save vba code, only xlsm

Post by JeJe »

Could you store the macros in your installation (mymacros) instead of the document?

You appear to be able to load an external library and create a library link... so perhaps you can store the macro separately in a library along with the document?

https://www.openoffice.org/api/docs/com ... ainer.html
Windows 10, Openoffice 4.1.11, LibreOffice 7.4.0.3 (x64)
Post Reply