2

I am developing using VBA in Libreoffice Calc. I found out via experimenting that it can read vbaproject in a .xlsm file.

I was able to read macros under vbaproject I had created via Excel, saved this file as a .xls file after edits, then closed the file and then Calc.

I expected the new file to be saved with the changes, but on reopening the file later, there were no modules visible under vbaproject which I thought shouldn't happen.

Can you save VBA code after viewing and editing, so it is saved and viewable next time file is accessed?

  • What version of LibreOffice? – Jim K Feb 22 '17 at 20:56
  • Unsure. It would be version that comes with linux mint v17. I will find out. – unseen_rider Feb 22 '17 at 21:19
  • It tells the verison in Help -> About LibreOffice. – Jim K Feb 22 '17 at 21:56
0

Try upgrading to a newer version of LibreOffice. With LO 5.1.6.2 on Ubuntu, I downloaded datavalcombo_addsortmulticol.xlsm, made a change under VBAProject and on sheet 1, then saved as .xlsm. The new document kept the changes.

With Apache OpenOffice 4.1.3 however, the macros did not work correctly, and apparently AOO cannot save in .xlsm format.

  • I have updated my question - I initially saved it as an .xls file. How about saving yours as an .xls file - can you replicate problem? – unseen_rider Feb 22 '17 at 21:21
  • The changes still worked correctly when saved as .xls. Does the problem occur with the example file from the link above? – Jim K Feb 22 '17 at 22:02

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.