TIP: Click on subject to list as thread! ANSI
echo: visual_basic
to: All
from: Randy Birch
date: 2004-11-02 05:55:00
subject: Re: Newbie Question

See if this gives you some ideas. It's possible to store and compare the
newly-generated random value against the saved values each time, but this is
a more efficient way. It's coded for 52 numbers, but changing to 5 is simply
achieved by merely changing the

Dim myArray(1 To 52) As Integer

line in the Command1 code.

http://vbnet.mvps.org/code/helpers/randomarray.htm

-- 


Randy Birch
MS MVP Visual Basic
http://vbnet.mvps.org/


"Uncle Whiplash"  wrote in message
news:cm70ah01lu9{at}enews2.newsguy.com...
: I have a question.  I am using randomize to pick a random number between
1-5.  Each number represents a question.  Once the number has been picked
and the question has been answered, how can i make the program NOT use that
same number twice?
:
: TIA
:
: Uncle
---
þ RIMEGate(tm)/RGXPost V1.14 at BBSWORLD * Info{at}bbsworld.com

---
 * RIMEGate(tm)V10.2áÿ* RelayNet(tm) NNTP Gateway * MoonDog BBS
 * RgateImp.MoonDog.BBS at 11/2/04 5:55:21 AM
* Origin: MoonDog BBS, Brooklyn,NY, 718 692-2498, 1:278/230 (1:278/230)
SEEN-BY: 633/267 270 5030/786
@PATH: 278/230 10/345 106/1 2000 633/267

SOURCE: echomail via fidonet.ozzmosis.com

Email questions or comments to sysop@ipingthereforeiam.com
All parts of this website painstakingly hand-crafted in the U.S.A.!
IPTIA BBS/MUD/Terminal/Game Server List, © 2025 IPTIA Consulting™.