Option VBASupport 语句
指定LibreOffice Basic 将支持一些 VBA 语句、函数和对象。
对 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