Ask Your Question
1

Macro in LibreCalc

asked 2018-05-30 22:43:23 +0200

szabaka gravatar image

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)

edit retag flag offensive close merge delete

Comments

1

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.

Ratslinger gravatar imageRatslinger ( 2018-05-31 03:05:57 +0200 )edit

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

szabaka gravatar imageszabaka ( 2018-05-31 12:14:23 +0200 )edit

@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.

Ratslinger gravatar imageRatslinger ( 2018-05-31 15:15:32 +0200 )edit

2 Answers

Sort by » oldest newest most voted
1

answered 2018-06-01 03:56:52 +0200

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.

edit flag offensive delete link more

Comments

@Mark McLean 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.

Ratslinger gravatar imageRatslinger ( 2018-06-01 04:15:55 +0200 )edit

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

szabaka gravatar imageszabaka ( 2018-06-02 16:42:37 +0200 )edit

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.

Mark McLean gravatar imageMark McLean ( 2018-06-03 12:48:38 +0200 )edit

I found this which relates to my situation: https://ask.libreoffice.org/en/questi... ... I'll try that paste idea later today, I wonder why the macro got lost last week. Thanks, I'll update the status later.

szabaka gravatar imageszabaka ( 2018-06-03 16:03:34 +0200 )edit

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):

szabaka gravatar imageszabaka ( 2018-06-04 16:33:55 +0200 )edit

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

szabaka gravatar imageszabaka ( 2018-06-04 16:39:29 +0200 )edit

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 gravatar imageszabaka ( 2018-06-04 16:42:28 +0200 )edit

@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).

Ratslinger gravatar imageRatslinger ( 2018-06-04 16:49:57 +0200 )edit

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 gravatar imageszabaka ( 2018-06-16 13:32:31 +0200 )edit

@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.

Ratslinger gravatar imageRatslinger ( 2018-06-16 15:36:04 +0200 )edit
0

answered 2018-05-31 12:12:04 +0200

szabaka gravatar image

updated 2018-05-31 13:43:04 +0200

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.

edit flag offensive delete link more
Login/Signup to Answer

Question Tools

1 follower

Stats

Asked: 2018-05-30 22:43:23 +0200

Seen: 109 times

Last updated: Jun 01 '18