Support for VBA Macros

Innhold
Innholdsliste 🔎︎

# Working with VBA Macros

Visual Basic for Applications (VBA) is an implementation of Microsoft's Visual Basic which is built into all Microsoft Office applications.

Support for VBA is not complete, but it covers a large portion of the common usage patterns. Most macros use a manageable subset of objects in the Excel API (such as the Range, Worksheet, Workbook, etc.) and the support include those objects, and the most commonly used method/properties of those objects.

## Loading Microsoft Office documents with executable VBA macros

Choose LibreOffice - PreferencesTools - Options - Load/Save - VBA Properties and mark the Executable code checkbox. Then load or open your document.

#### Kjørbar kode

VBA-kode (Visual Basic for Applications) blir lest og er klar til å kjøres. Hvis det ikke er satt et merke i denne avkryssingsboksen, vil VBA-koden være kommentert ut slik at du kan se på den, men den vil ikke bli kjørt.

Etter å ha lastet inn VBA-koden, setter LibreOffice inn setningen Alternativ VBASupport 1 i hver basismodul for å aktivere begrenset støtte for VBA-setninger, funksjoner og objekter. Se Option VBASupport Statement for mer informasjon.

## Running VBA Macros

Run VBA macros in the same way as LibreOffice Basic macros.

Since support for VBA is not complete, you may have to edit the VBA code and complete the missing support with LibreOffice Basic objects, statements and functions.

## Editing VBA Macros

VBA macros can be edited in the LibreOffice Basic IDE.

Lignende emner

VBA Properties

LibreOffice Basic IDE