Working with macros in xlsx

I have a Calc doc that is saved as an xlsx because it’s shared with MS Office users. I’d like to write some macros in that doc, but I know that new modules/libraries are NOT saved when saving to XLSX format.

How can I start a new VBA macro library in this doc?

Thanks!

Dan

How can I start a new VBA macro library in this doc?

From my point of view: Not at all, without a lot of overhead.

  • Use .ods for you master document
  • Develop the VBA code
  • Test
  • Export your VBA code to external files (format depends on what Excel can import)
  • Export (Save As) current status of your .ods version to .xlsx
  • Provide the .xlsx version of the current document along with exported VBA code (al least 2 files) to MS users and advice them, to import the VBA code within Excel.

Darn - thanks. I had one other thought (I don’t really know Excel …); can I open the file in Excel and create a couple of macros, then edit the resulting stuff in LibreOffice?

Provided settings in Tools -> Options -> Load/Save -> VBA Propertis are set to [X] Load Basic Code et. al. - yes, you can load .xlsx files containing and preserving macros and edit 'em in LibreOffice.