Dela via


Control Statement for Visual Basic 6.0 Users

Visual Basic 2008 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 2008

In Visual Basic 2008, 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 2008 still supports the On Error statement.

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

See Also

Concepts

Procedure Calling Sequence for Visual Basic 6.0 Users

Programming Element Support Changes Summary

Reference

Call Statement (Visual Basic)

Function Statement (Visual Basic)

Sub Statement (Visual Basic)

Return Statement (Visual Basic)

Select...Case Statement (Visual Basic)

On Error Statement (Visual Basic)

End Statement