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 - Load/Save - VBA Properties and mark the Executable code checkbox. Then load or open your document.

Π˜ΡΠΏΠΎΠ»Π½ΡΠ΅ΠΌΡ‹ΠΉ ΠΊΠΎΠ΄

Π‘ΡƒΠ΄Π΅Ρ‚ Π·Π°Π³Ρ€ΡƒΠΆΠ΅Π½ ΠΊΠΎΠ΄ VBA (Visual Basic для ΠΏΡ€ΠΈΠ»ΠΎΠΆΠ΅Π½ΠΈΠΉ), Π³ΠΎΡ‚ΠΎΠ²Ρ‹ΠΉ ΠΊ исполнСнию. Если Π² это ΠΏΠΎΠ»Π΅ Ρ„Π»Π°ΠΆΠΎΠΊ Π½Π΅ установлСн, ΠΊΠΎΠ΄ VBA Π±ΡƒΠ΄Π΅Ρ‚ Π·Π°ΠΊΠΎΠΌΠΌΠ΅Π½Ρ‚ΠΈΡ€ΠΎΠ²Π°Π½ для Ρ†Π΅Π»Π΅ΠΉ ΠΏΡ€ΠΎΠ²Π΅Ρ€ΠΊΠΈ ΠΈ Π½Π΅ Π²Ρ‹ΠΏΠΎΠ»Π½Π΅Π½.

Π—Π½Π°Ρ‡ΠΎΠΊ подсказки

After loading the VBA code, LibreOffice inserts the statement Option VBASupport 1 in every Basic module to enable a limited support for VBA statements, functions and objects. See Option VBASupport Statement for more information.


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.