LibreOffice 6.1 Help
指定必须使用 Dim 语句明确声明程序代码中的每个变量。
Option Explicit
此语句必须位于模块中的可执行程序代码之前。
Sub ExampleExplicit
Dim sVar As String
sVar = "Las Vegas"
For i% = 1 To 10 ' 将导致运行时错误
Rem
Next i%
End Sub