Convert Excel Macro Code to Libre's Code


I’m new to LibreOffice (LOffice), so I apologize in advance, but I’m gonna have to use Microsoft Office (MOffice) terms to describe my problem, as I don’t know the terminology Libre uses yet.

I have an Excel Macro file (.xlsm) that contains many sheets (~15 sheets).
In each sheet, there are Developer buttons that do all kinds of different actions (moving to the next/last sheet, printing the sheet as a pdf, displaying message boxes, changing values in cells, etc.). I also have Macro coding that is tied to some of the sheets themselves.

I have 2013 Microsoft Office (MOffice) at home, but 2019 Office at work. I made the Excel file at work. I found out that when I open the file at home, some Excel formulas (such as =textjoin() ) don’t work. I’m happy to find out that these formulas work in LibreOffice. Yeah! :smiley:

However, I noticed that none of my Macro buttons are working! It looks like Libre’s Macro UI is slightly different from MOffice’s and Libre doesn’t seem to recognize the buttons/code.

Is there some way to convert the Excel code to Libre code? Can I just simply copy and paste the code into Libre’s macros?

Owen (PadawanCoder)

I might have been a bit to hasty with my first answer. It seems like LO has “limited” VBA support.
ref: Support for VBA Macros
So a complete rewrite might not be necessary, but … i would still mind the note:

Hope that helps (a bit more.)

[previous post]


this quote might answer your question.

LibreOffice Basic is not the same
language as Excel VBA, and the API is
very different between the two suites.
So most likely you will need to
rewrite the macros for LibreOffice to
get them to work.

Source: How do I use ms excel macros in Calc

Hope that helps.

Bummer! : (

Well, guess I’ll have to learn some new code!

Thanks igorlius!