Macros in a Calc sheet just stopped working

Yes… I ticked the boxes in ‘Tools-Options-LibreOffice-Advanced-Optional Features’

I recorded and saved a couple of simple macros in Calc. I tested them, they worked fine. When I closed the sheet, and came back to it later. the macros just stopped working. I assigned them to a button. But, they would not work whether I pressed the button or if I used ‘Run Macros…’ in Tools.

This happened earlier today, I reset the User Profiles, and they came back. But, they stopped again. I tried resetting User Profiles again, but that did not work this time.

(See my update in the comments below.)

An update: I started a new spreadsheet. Macros worked in the new sheet. But, the question remains, “Why have they stopped working in the other sheet that I worked so long to build?”

Is there some feature that stops macro execution within a spreadsheet?

Where your macros are stored?

What file type are you using?

Can you upload an ODF type sample file and the macro code here?

They were stored under My Macros-Module1. I created a new spreadsheet, and the new macros worked for a while. But, they just stopped again! I have tried Record Macro over and over again, overwriting the old macro, or making new macros. The spreadsheet macros just stopped working altogether.

I even tried changing the security level to the lowest level. Macros just stopped working.

Can you upload an ODF type sample file and the macro code here?

We can quessing only without the specific informations.

I’d love to upload the actual spreadsheet for your inspection, but I don’t know how to do it in the comment section. The Answer section allows attachments. I’ll try to send it there.

Edit your original question.

Please upload the macro code too.

You marco was assigned to the Event “Execute action”.

Try to assign it to the Event “Mouse botton pressed”.

Zizi64 - A good suggestion… but I tried that and changed nothing.

But wait until you hear this:

I had a hunch. The Names I gave the buttons in Control Properties had spaces, so I took away the spaces. The macros I changed and re-saved started working again. (???) That makes no sense whatsoever, because the original button Names all have spaces in them, such as, ‘Push Button 1’. (The button ‘Labels’, too, have spaces between words.)

In the meantime, I copied the data from the problematic spreadsheet and pasted it into a new spreadsheet and recorded new macros. The macros worked just fine in the new document. Meanwhile… the macros in the problematic spreadsheet started working after I took the spaces out of the names.

What a mystery!

I can not suggest more tips without seeing the recorded (or written) macro code…
I can not determine (without trying your macro) how related the issue to the name of the button, or to copying of the buttom…

be aware that starting macros with a button sometimes has problems, ‘stealing the focus’ or similar, there are workarounds / a special setting to avoid problems from that …

I know this cannot be, but I did this to the button name, then re-recorded the macros. Now all the macros work.
(What in the world?!)

image description