I am trying to fill the array by looping through the range and selecting values by parameter. The code that I am trying does not make the job. Can you help fixing the code, please?
[VBA] For i = 1 To r_Major.Count
If Me.cmbRegion.Value = r_rgn(i).Value And _
Me.cmbPeriod.Value = r_Date(i).Value And _
Me.lstDetails.Value = Rg(i).Value And _
Me.cmbMajor.Value = r_Major(i) And _
Me.cmbMinor.Value = r_Minor(i) Then
k = k + 1
ReDim Arr(k - 1, 1)
Arr(k - 1, 0) = Rg(i)
Arr(k - 1, 1) = r_rgn(i).Offset(0, 1)
End If
Next i
lstSubDetails.List = Arr[/VBA]