I am trying to set the values of an array of Collections inside a For loop. However, when I go to run the program, it throws a compile error that states "Argument not optional" and highlights the part where I set the array value. When I go to debug the subroutine, I cannot get past the first line of ConvertbucketCollectionTobucketArray(). At that point, bucketArray elements 0 through 12 have a value of Nothing and bucketCollection contains 13 elements(1-13), where only several contain items.
Dim bucketCollection As New Collection 'the Collection of buckets
Dim bucketArray(12) As New Collection 'bucketCollection as an array
...
Private Sub ConvertbucketCollectionTobucketArray() 'debugger stops here
Dim newCol As Collection
Dim i As Integer
For i = 1 To bucketCollection.count
Set newCol = bucketCollection.Item(i)
bucketArray(i - 1) = newCol 'highlighted line here
Next
End Sub