Export (0) Print
Expand All
A
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.

Syntax

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.

Remarks

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.

Show:
© 2015 Microsoft