Tell Me It’s True

Tell Me It’s True

The typical method of validating multiple expressions is to string together a series of If statements separated with an equal number of And statements. Shorten that process by passing one or more comma-delimited equations to return a True or False result:

 Function IsTrue(ParamArray paOptions()) As Boolean	Dim lLoop As Long	IsTrue = True	For lLoop = LBound(paOptions) To UBound(paOptions)		IsTrue = IsTrue And paOptions(lLoop)		If paOptions(lLoop) = False Then Exit For	Next lLoopEnd Function


Share the Post: