Array - Optionbase = 1

     

  • It copies the data by considering optionbase = 1
  •  

     

    Option Base 1
    Private Sub CommandButton1_Click()
    Dim j As Variant, i As Integer
    i = 1
    j = Array(110, 120, 130, 140)
    For i = 1 To 3
    Range("A" & i).Value = j(i)
    Next
    End Sub

     

    Download The Workbook

     

     

    Array - Optionbase = 0

     

  • Optionbase = 0
  •  

    Option Base 0
    Private Sub CommandButton1_Click()
    Dim j As Variant, i As Integer
    i = 1
    j = Array(110, 120, 130, 140)
    For i = 1 To 3
    Range("A" & i).Value = j(i)
    Next
    End Sub