Changes to Procedure Declarations

Many procedures are no longer supported in Visual Basic .NET. The fact that Visual Basic .NET is strongly typed makes the procedures or the constructs irrelevant; thus irrelevant procedures were removed or retasked in Visual Basic .NET.

IsMissing Is Missing

The IsMissing function checks for Optional Variant parameters that may not have a value. VB6 allowed Optional arguments to be declared without a default value.

Tip

Many of the constructs that have changed or been removed are demonstrated in the VB6 sample code, Grammar.vbp, on this book's Web site at www.samspublishing.com.

Private Sub HasOptional(Optional ByVal Value As Variant)
  MsgBox IsMissing(Value)
End Sub

If the caller invokes the HasOptional procedure ...

Get Visual Basic® .NET Unleashed now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.