LibreOffice 25.2 帮助
指定LibreOffice Basic 将支持一些 VBA 语句、函数和对象。
对 VBA 的支持不是完整的,但是涵盖了大部分常见的使用模式。
启用 VBA 支持后, LibreOffice Basic 函数参数和返回值与其 VBA 版本的相应函数一致。禁用支持时, LibreOffice Basic 所接受的参数以及返回值可能与 VBA 对应对应版本不同。
Option VBASupport {1|0}
1: 启用 LibreOffice 中对 VBA 的支持
0: 禁用 VBA 支持
Option VBASupport 1
Sub ExampleVBA
Dim sVar As Single
sVar = Worksheets("Sheet1").Range("A1")
Print sVar
End Sub