Sub LUBound()
    Dim myArray() As Long
    
    ReDim myArray(3 To 7)

    MsgBox "LBound: " & LBound(myArray) & vbNewLine & "UBound: " & UBound(myArray)

    ReDim myArray(1 To 5)

    MsgBox "LBound: " & LBound(myArray) & vbNewLine & "UBound: " & UBound(myArray)

End Sub

 

Microsoft Office ブログランキングへ