Macro in LibreCalc

I keep my LibreCalc file in my Google drive and use this on different PCs (Win10).

Today on one PC my Macro disappeared. I went to another PC and it worked fine.

Going back to the PC that would no longer run the Macro, I do not see the Macro in my list, but I do see it stored in the same directory as my Calc file.

How do I attach or assign this Macro back into my Calc on this PC? ps: since that PC is opening the same exact file as my other PC was, why would this Macro assignment have been lost?

(I am sure that my Google Drive did duplicate onto the PC so it’s not a case of a time-stamp mismatch)

Hello, Your question lacks certain info. How are you using the Calc file? Are you using a synced folder? Is it remote access from LO? If synced folder are you opening it from there? Are all PC’s using same process? How are you “seeing” the macro in a directory? Is the macro embedded in the Calc file or stored in My Macros or even somewhere else? To what is the macro supposed be attached to - button, toolbar, menu? Just a few open questions.

my comment was too long so I put this in as an answer, I hope that works

@szabaka You should only use an answer to answer the original question. If you need more space, edit original question. Your answer is shorter than my comment!

Don’t know what your statement actually means. Don’t see where any of the questions asked are actually answered. Don’t think it is a bug at this point but possibly a procedural problem. Have not seen macros “not showing up” in the years using LO.

I had similar with 2 computers. Before opening the file, do in LibreOffice, Tools/options/LibreOffice/Security… Set Macro Security to Medium… Then try opening the file.

@MarkMcLean I believe you almost hit the nail. Security is probably set to High but it may have been working prior because the Trusted Sources was configured. If it is now being run from a location other than this Trusted Source location, it appears the macro isn’t there when actually it is just automatically disabled.

All three PCs have the Macro Security at Medium (and when I open the file it tells me I have a Macro and asks for permission to run it).

All PCs have JRE installed.

One one trouble PC I uninstalled LibreOffice and reinstalled it at v5 level. Stil, no macro.

When I do a: Tools/Macros/Edit Macros … my Macro is not there! But on the PC that does run this Macro it is there. Physically that Macro is missing even though this is the exact same file. adding to Trusted Source does no help either

Are Macro’s saved in the file? Or in LO only, in “My macros& Dialogs”? If in My macros& Dialogs, copy and pasted them into the file, to follow file. To see where there at, in macro edit, open View/Object Catalog. Or, maybe a quick fix, trick, is to copy all the macro’s, in a new write file, Paste Special/ Unforrmatted Text, then copy paste that into your PC that does not show macro’s, in the file. View/Object Catalog, my be the key, see where there being saved. in file or LO.

I found this which relates to my situation: Move Macros with the Calc Document … I’ll try that paste idea later today, I wonder why the macro got lost last week. Thanks, I’ll update the status later.

I got it working across all PCs, if this is in some documentation I missed it. It certainly is different than excel.

The process: after recording the Macro and naming it:

Tools / Macros / Organize Macros / LibreOffice Basic

click on the filename, look in Modules for that Macro (I don’t know how that goes where … I found it in Sheet 1

click on that, then find the Macro in “Existing” on the right, click “assign” …

click Keyboard

(continued in another comment):

click Category, expand LibraOffice Macros

find the filename and expand it

find the Macro (I found min in "Sheet1)

it should now show in the Function box, click on it

go to Shortcut Keys box and choose the Key you want (e.g. I chose F3)

click the Modify box (note: the radio button over that I have set at “Calc” … I presume if you chose LibreOffice it would apply to other programs?

You should now see the key (e.g. F3) i the Keys box

click OK … save the file and all is good

in summary, this case is closed (and whomever may close this) … but, whomever handles the ‘help’ file please consider putting directions like this in there (if they are, I could not find them)

Thank you for the help Mark, I appreciate this forum for finding clues

@szabaka Much of this could have been solved many days ago had you answered a few questions asked by myself many days ago.

You have probably not viewed the LO documentation found here and other places (even on this forum in upper right section) → LibreOffice Calc Guide. Please look through Chapter 12 - Calc Macros (version not a big concern - still applies).

Thank you for the pointer to the Calc Guide, that looks great. (I am not sure where this is found without your pointer, you state it is in the upper right section but I can not find that). Sorry about not answering your prior questions, it appears I did not know enough to understand how to answer them (e.g. these are stored so much differently than in Excel or 1-2-3 that I was clueless).

@szabaka On the page with Questions for the Ask forum, Near the top of the page in the right hand column, there is a section called Resources. One of the items there is Books, guides and more. Click on it. The is also an item there How to use the Ask site.

I moved my file to a separate directory, seems the *.cfg files are not needed.

This may be a bug in 6.0.4 (x64), i.e. the macros from 6.0.3.2 (x64) are not showing up.