saving macros in calc

System info: iMac 24”, M1, 1021, 8GB RAM, Monterey 12.4

LibreOffice: 7.3.4.2

Problem: after recording, saving and running a macro in Calc, whenever I quit the programme and re-open it the macro has disappeared.

I record a macro using Tools → Macros → Record macro

I then click Stop Recording, and then follow the advice set out in chapter 13 of the Getting started guide to save the macro. When I then run the macro it runs perfectly, no problems.

However, when I quit the application and reopen it the macro has disappeared completely.

Has anyone else encountered this problem? And how/if was it resolved?

Vince73

Where you saved the macro to? Into a Module of the actual Document? Or into a Module of the Standard library in the MyMacros?

Do you save your document as XLSX (not ODS)?

Saved as ODS

Into a module of the standard library in the MyMacros

blocked.gif

I have saved it into a module of the standard library in MyMacros

I saved it into a module of the standard library in MyMacros

blocked.gif

It seems others are having the same issue on macOS: 154570 – LO Writer not saving macros globally on macOS (works in file)

And from the bug-report we learn saving the macro in the document instead of MyMacros is (maybe) possible.
.
If that works, I’d test, if I can save anything to MyMacros (test with a simple Basic-Macro). If not, maybe MacOS prevents one from changes in programs folders…
.
PS: It may not be so easy:

Anyone has any more ideas on how to resolve this issue?

Can you make a video of the process? From the verbal description it is not clear what and where is going wrong. Perhaps the video will help to understand the situation.

video file was too large to send by email, and i couldn’t upload it here

sorry JohnSUN,

file was too large to be attached

@vince73 How about posting it on YouTube, and only giving a link to the video here?

Sheet cell functions written in StarBasic are the only use case which requires the “Standard” library. For anything else, global Basic code should be stored in a user-defined library. User-defined library make everything more clear, and you can easily export a non-“Standard” library as an installable extension.