Pomoc LibreOffice 24.8
Operatory porównania porównują dwa wyrażenia. Wynik jest zwracany jako wyrażenie logiczne, które określa, czy porównanie jest True (-1) czy False (0).
  result = expression1 { = | < | > | <= | >= } expression2
result: Wartość logiczna określająca wynik porównania (True lub False)
expression1, expression2: Dowolne wartości liczbowe lub ciągi, które chcesz porównać.
= : Równe
< : Mniejsze
> : Większe
<= : Mniejsze lub równe
>= : Większe lub równe
<> : Różne od
Sub ExampleUnequal
Dim sFile As String
DIM sRoot As String ' Katalog główny dla pliku wejściowego i wyjściowego
    sRoot = "c:\"
    sFile = Dir$( sRoot ,22)
    If sFile <> "" Then
        Do
            MsgBox sFile
            sFile = Dir$
        Loop Until sFile = ""
    End If
End Sub