If Function
SyntaxGroupIf(condexpr, TruePart, FalsePart) -or- If(TruePart, FalsePart)
MiscellaneousDescription
Return the value of the parameter indicated by condexpr. Only one of the TruePart and FalsePart is evaluated.Remarks
The two parameter versionIf(TruePart, FalsePart)is the same asIf(TruePart IsNot Nothing, TruePart, FalsePart)
See Also
Parameters Description condexpr If this value is True then return TruePart. Otherwise, return FalsePart. TruePart Return this value if condexpr is True. FalsePart Return this value if condexpr is False.
If, Select Case, Choose( ), IIf( )
Sub Main Debug.Print If(1 > 0,"True","False") '"True" End Sub