Hi guys,

Interestingly, it still didn't work. I had to change all the [] to () then it worked, BUT, it still isn't giving me what I want.

When I create a file with the following entries:
Line1
Line2
Line3
Line4
Line5

and I run the code

 Code:
srnd(@msec)
$Pick = 4 ; how many do you want
$Counter = 0
Open(1,"c:\data\file.txt")
$Line = Readline(1)
While @error = 0
  redim preserve $Array[$Counter]
  $Array[$Counter] = $Line
  ? $Line 
  $Counter = $Counter + 1
  $Line = Readline(1)
Loop

$Size = Ubound($Array)

For $Output = 0 to $Pick
 $Array(RND($size)) ?
Next
Sleep 3


the first part of the array gives me the list of all the lines, but there is a 0 in it, and the random part gives me 5 random numbers, not 4 as expected, and not the actual data

Is something a bit amiss?

Thanks