Logo
Home Cart [Log In] About Us Contact Us

Object Reference

xf_BaseInstanceXF Base Module

Public Function mt (
varToTest As Variant,
Optional SuppressError As Boolean = False,
Optional TrimStrBeforeTest As Boolean = True
) As Boolean

Is the variable empty (Null, or empty string) ? This is named in the tradition of very short, much used functions like nz() and iif(). Pronounce 'Em Tee', and we use this name because Empty and IsEmpty() are already taken in VBA.

varToTest as Variant

A variant value

Optional SuppressError as Boolean = False

Suppress error if an error occurs

Optional TrimStrBeforeTest as Boolean = True

If the varToTest is a string, trim spaces before testing

Call Template:

Dim b As Boolean
b = mt(varToTest)
b = mt(varToTest, SuppressError, TrimStrBeforeTest)

See Also:

Example 1:

mt(Null)   => True
mt("")     => True
mt("0")    => False
mt(0)      => False
mt(23)     => False
mt(False)  => False
Contact Us :: About Us :: Policies :: email: infspamo@arrospamw-of-tispamme.com    © 2012 Arrow Of Time Pty Ltd