Dynamic array (as string)

Use this code to dynamically build an array. It will redim the array and add one more index for input for each new entry.
LotusScript


Dim x As Long
Dim StringArrayValues() As String
Redim StringArrayValues(x) As String
	
If StringArrayValues(0) = "" Then
	StringArrayValues(x) = doc.fieldname(0)
Else
	x = x + 1
	Redim Preserve StringArrayValues(x) As String
	StringArrayValues(x) = doc.fieldname(0)
End If	

Posted by fbrefere001 on Wednesday March 13, 2002