Sub Scramble(c) 'This sub creates an array of pairs of numbers, ie, if c = 4, Images Array will be Image1,Image2,Image3,Image4,Image1,Image2,Image3,Image4
For Id = 0 To c
Images = Images & Id & ","
Next c
Images = Images & Images
End Sub
Sub RandomSelect
ID=""
Last=StrLength(Images)
Pointer=Rnd(0,Last-1)
Do Until StrAt(Images,Pointer)="," Or Pointer=0
Pointer=Pointer-1
Loop
If Pointer>0 Then Images=StrRemove(Images,Pointer,1)
Do Until StrAt(Images,Pointer)=","
ID=ID&StrAt(Images,Pointer)
Images=StrRemove(Images,Pointer,1)
Loop
If Pointer=0 Then Images=StrRemove(Images,Pointer,1)
Return ID
End Sub