Skip to Content
0
Former Member
Nov 03, 2009 at 05:35 PM

Redim an Array

101 Views

Dim n As Number

Dim ary() As String

'Formula = UBound(ary) 'Returns zero

n = UBound(ary) + 1

Redim Preserve ary(n)

ary(n) = "Field"

'Formula = ary(n) 'Returns field value

'Crystal reads more details and adds to

'the array with the above code section.

'Now I want to reset the array

'back to its original state with

'a size of zero. I don't want an array

'with size one, even if the first value

'is an empty string

Redim ary(0) 'Error -- must be 1 and 1000

Formula = UBound(ary)

Is it not possible to restore the array to size zero?

Thanks,

Art