First Item is that I think you should use FreeFileHandle() instead of looping.: Code:

FreeFileHandle( )

Action: Returns the first available file handle.

Syntax: FreeFileHandle ( )

Parameters: None.

Returns: 0 No file handle available.
> 0 Numeric file handle.

See Also: Open( ), Close( ), ReadLine( ), WriteLine( )

Example: $Handle = FreeFileHandle()
IF $Handle > 0
IF Open($Handle, @LDRIVE + "\CONFIG\SETTINGS.INI") = 0
;………
ENDIF
ENDIF



You should DIM your array as $array[0] (one element)

Then you should use UBound( ) to determine the avaialble subscript of the array.

If you need to add an element use ReDim preserve $Array[Ubound($Array)+1]
_________________________
Home page: http://www.kixhelp.com/hb/