result = NOT expr

The logical 'NOT' operator (Boolean).


exprThe expression to negate (Boolean).

REMARKS
* This is an Operator.
* You can use the AND operator to return the logical "AND" operator.
* You can use the OR operator to return the logical "OR" operator.
* The equivalent Excel function is Application.WorksheetFunction.NOT
* For the Microsoft documentation refer to docs.microsoft.com

Debug.Print Not True    '= False  
Debug.Print Not 10 '= -11
Debug.Print Not 1 '= -2
Debug.Print Not -1 '= 0
Debug.Print Not 0 '= -1
Debug.Print Not (2 = 2) '= False
Debug.Print Not 2 = 2 '= False

Dim iValue As Integer
If Not (iValue = 5) Then
End If

© 2021 Better Solutions Limited. All Rights Reserved. © 2021 Better Solutions Limited Top