// troubleshooting guide · libreoffice

LibreOffice Calc VBA Macros Not Working

Status
Workaround available
platforms:
Windows, macOS, Linux
updated:
November 15, 2026
reports:
5
Method
how we research
Share

RUNBOOK · libreoffice/vba-macros4 FIXES

// quick answer

Calc supports only part of VBA and can't save it into xlsx. Enable VBA support or rewrite in LibreOffice Basic or Python.

Most likely fix: Check macro security

How to fix it

// try these in order, the most common fix is first

  1. FIX 1Check macro security

    1. 01Tools > Options > LibreOffice > Security > Macro Security: set Medium
    2. 02Reopen the file and choose Enable Macros
    Did this fix it?
  2. FIX 2Enable VBA execution

    1. 01Tools > Options > LibreOffice Calc > Formula
    2. 02Tick Execute Excel 2007 and newer macros under VBA Properties
    Did this fix it?
  3. FIX 3Save as ODS and port macros

    1. 01Save the workbook as .ods
    2. 02Rewrite code in LibreOffice Basic or Python using the UNO API
    Did this fix it?
  4. FIX 4Keep a copy in Excel

    1. 01Run the macro workbook in Excel for production use
    Did this fix it?

Symptoms

Buttons, userforms and macros in an .xlsm do nothing, or macros disappear after saving.

Why it happens

  • C-01Different object model from Excel
  • C-02Macro security level blocks macros
  • C-03xlsx format can't store LibreOffice Basic macros
  • C-04Unsupported VBA keywords

// this guide also covers

  • libreoffice vba macros not working
  • libreoffice calc macro xlsm
  • libreoffice excel macros

Still not working?

If LibreOffice keeps failing, you're not alone. See every LibreOffice problem users report or the alternatives people switch to.

Have an app idea? Our small team builds any software: web and mobile apps, games, desktop, AI tools. Price agreed together.

Talk to us

Watch LibreOffice Get an email when its price changes, it has an outage, or we publish a new fix. No spam.

Fixed it? Share this guide

Other LibreOffice errors

All 10 LibreOffice errors and fixes →