C
Craig
I have the following code...I was told by some people on
this message board to use this 'ReDim' stuff or something
that looks like the following code to "pigeonhole", or
allocate memory to my array. My question is, what does
the following code do? I only want an array as big as how
many elements are going into it, and that number can
change each time. What am I actually doing in the below
code. Any help would be appreciated. thanks
Craig
Dim TheArray()
Dim n As Integer 'integer used with dynamic array
Dim tbl1 As DAO.Recordset
ReDim Preserve TheArray(0 To 9000) As String
For n = 0 To 9000
TheArray(n) = Chr(Int(Rnd * 26) + 65)
Next
ReDim Preserve TheArray(0 To 10000) As String
For n = 9001 To 10000
TheArray(n) = Chr(Int(Rnd * 26) + 65)
Next
this message board to use this 'ReDim' stuff or something
that looks like the following code to "pigeonhole", or
allocate memory to my array. My question is, what does
the following code do? I only want an array as big as how
many elements are going into it, and that number can
change each time. What am I actually doing in the below
code. Any help would be appreciated. thanks
Craig
Dim TheArray()
Dim n As Integer 'integer used with dynamic array
Dim tbl1 As DAO.Recordset
ReDim Preserve TheArray(0 To 9000) As String
For n = 0 To 9000
TheArray(n) = Chr(Int(Rnd * 26) + 65)
Next
ReDim Preserve TheArray(0 To 10000) As String
For n = 9001 To 10000
TheArray(n) = Chr(Int(Rnd * 26) + 65)
Next