抽6個座號不重複
dim num(5)
randomize
for i = 0 to 5
do
num(i)=round(rnd*6+0.5,0)
dupflag = 0
for j = 0 to i-1
if i>0 and num(i) = num(j) then
dupflag = 1
Exit For
end if
next
Loop while dupflag = 1
output=output & num(i) & ","
next
msgbox(output)