Export (0) Print
Expand All
Expand Minimize

Visual Basic for Applications Reference

Visual Studio 6.0

Assert Method

See Also    Example    Applies To    Specifics

Conditionally suspends execution at the line on which the method appears.


object.Assert booleanexpression

The Assert method syntax has the following object qualifier and argument:

Part Description
object Required. Always the Debug object.
booleanexpression Required. An expression that evaluates to either True or False.


Assert invocations work only within the development environment. When the module is compiled into an executable, the method calls on the Debug object are omitted.

All of booleanexpression is always evaluated. For example, even if the first part of an And expression evaluates False, the entire expression is evaluated.

© 2015 Microsoft