IIF

Works the same as it's VB IIF equivalent. IIf will coerce an expression into Boolean and return values based on that expression.
All three arguments are passed by value and not by reference. You cannot pass object references by value. Returns variant.

CodeFunctionName
What is this?

Public

Tested

Imported
Public Function IIf(ByVal expression, ByVal Value_if_true, ByVal Value_if_false)
    if cbool(expression) then IIf = Value_if_true else IIf = Value_if_false
End Function

ByVal expression, ByVal Value_if_true, ByVal Value_if_false

Views 4,741

Downloads 1,370

CodeID
DB ID

ANmarAmdeen
626
Attachments
Revisions

v2.0

Friday
January
19
2024