View Single Post
  #4   Report Post  
Posted to microsoft.public.excel.programming
Claus Busch Claus Busch is offline
external usenet poster
 
Posts: 3,872
Default Six columns randon no.'s no dupes

Hi Howard,

Am Thu, 6 Mar 2014 00:21:40 -0800 (PST) schrieb L. Howard:

For i = 1 To 6
MsgBox Small & " " & Big
NumberOfRandoms = Big

' Load up an array with all the values for the range of random numbers
ReDim Numbers(1 To Big - Small + 1)
For X = Small To Big
Index = Index + 1
Numbers(Index) = X

Next


change the above to:

For i = 1 To 6
MsgBox Small & " " & Big
NumberOfRandoms = Big - Small + 1

' Load up an array with all the values for the range of random numbers
For X = Small To Big
Numbers(Index) = X
Index = Index + 1
Next

So Numbers has always 20 items decare it:
dim Numbers(19) As Long


Regards
Claus B.
--
Win XP PRof SP2 / Vista Ultimate SP2
Office 2003 SP2 /2007 Ultimate SP2