unable to store .xlsm file

I read a .xlsm in Calc5, do modifications to get a Button to work but can’t save the file with .xlsm extension. Why?
Best regards.

I assume this is a follow on to your previous Forum post in which you said that you could run the Macro when opening the .xlsm file in LO but the Macro was not attached to the button.

If you have access to Excel check that the Macro is attached to the button. In the example spreadsheet I attached to that posting I set the button to run the Macro when I created the sheet in Excel and it was attached when I opened it in LO.

You have found a problem which I can confirm. The .xlsm file opened in LO will run the Macro but if you make changes to the file an attempt to save it you get a message that “you will lose the Macros in this Macro free document” !! If you do continue you find that it saves as .xlsm without the macros – which is strange. Looking at the available formats to save spreadsheet files there is no mention of .xlsm so I guess this is the reason.
I went back to Excel and saved my example as .xls, an old format, and i find that when opened in LO it works an can be saved after changes. So if you have Excel or the sheet is being sent to you by someone get it in .xls format.

If you don’t need the sheet in Excel format open the .xlsm file in LO and save in LO native format .ods. The macros work and you can save changes.

It’s working using the .xls format. Thanks very much for your help.