This documentation is archived and is not being maintained.

Control Statement Changes in Visual Basic

Visual Basic .NET updates several statements controlling the flow of execution.

Visual Basic 6.0

In Visual Basic 6.0, the GoSub statement calls a sub-procedure within a procedure. The On ... GoSub and On ... GoTo constructions, also known as computed GoSub and computed GoTo, provide compatibility with early versions of BASIC.

The While ... Wend construction loops through code while a specified condition is true.

Visual Basic .NET

In Visual Basic .NET, you can call procedures with the Call statement, and the GoSub statement is not supported. You can perform multiple branching with Select...Case statements, and the On ... GoSub and On ... GoTo constructions are not supported. However, Visual Basic .NET still supports the On Error statement.

Visual Basic .NET retains the While ... Wend construction, but replaces the Wend keyword with the End statement. The Wend keyword is not supported.

See Also

Procedure Calling Sequence Changes in Visual Basic | Call Statement | Function Statement | Sub Statement | Return Statement | Select...Case Statements | On Error Statement | End Statement | Programming Element Support Changes Summary

Show: