You need to initialize the arrays you're using ("ColumnDate" and "SingleDate") with the maximum number of elements they will store, in this case, you should type something like this:
CODE
Redim ColumnDate(252)
Redim SingleDate(252)
It seems like 252 is the maximum value according with that "For" loop in your code
Also, I'm not 100% sure anymore, but my experience tells me that declaring many variables inside the same "Dim" but only using one "As" like this:
CODE
Dim ColumnDate(), SingleDate() As String
Just makes the last variable (SingleDate) of the specified datatype, but any previous variables will be declared as Variants (ColumnDate), so in this case, you have that:
SingleDate is a String Array
ColumnDate is a Variant Array
It doesn't matter, because Variant can store any basic datatype, but I think it's better for performance issues to use specific datatype whenever it's possible, instead Variant
This post has been edited by dino_rpg: 22 Dec, 2006 - 06:50 AM