Example - Option Base Statement

  1. Option Base 1' Module level statement.

    Sub Main

    1. Dim A(), Msg, NL' Declare variables.

      NL = Chr(10) ' Define newline.

      ReDim A(20) ' Create an array.

      Msg = "The lower bound of the A array is " & LBound(A) & "."

      Msg = Msg & NL & "The upper bound is " & UBound(A) & "."

      MsgBox Msg' Display message.

    End Sub