Guys

I have a spreadsheet with a column of data (dates, to be exact) that could potentially change. I have some code which does what I want to do very well except the current values in the column are hard-coded into an array, thus:

VB Code:
  1. myArray = Array("01/10/2003", "01/11/2003", "01/12/2003", "01/01/2004", "01/02/2004", "01/03/2004", "01/04/2004", "01/05/2004", "01/06/2004", "01/07/2004", "01/08/2004", "01/09/2004", "01/10/2004", "01/11/2004", "01/12/2004", "01/01/2005")

As these dates may change or indeed be added to, I want to be able to dynamically build the array. I've tried the following, to no avail:

VB Code:
  1. Do Until x = intRows
  2.    
  3.     ActiveSheet.Cells(x, 7).Activate
  4.    
  5.    
  6.         If strarray = "" Then
  7.        
  8.             strarray = ActiveSheet.Cells(x, 7) & Chr(34)
  9.    
  10.         Else
  11.             strarray = strarray & "," & Chr(34) & ActiveSheet.Cells(x, 7) & Chr(34)
  12.                    
  13.         End If
  14.        
  15.         x = x + 1
  16.     Loop
  17.  '   MsgBox strarray
  18.  
  19.     intlength = Len(strarray) - 1
  20.     strarray = Left(strarray, intlength)
  21.     myArray = Array(strarray)

The problem seems to be that although strarray builds up and contains all the correct data, myArray is never populated. I'm pretty sure I'm doing something stupid but I'm just not sure what.

Cheers