Har genererat 7 nummer tex 16 8 26 1 21 19 33 nu vill jag ha dom sorterade i txtboxar så här 1 8 16 19 21 26 33 HejPLACERING
Sv: PLACERING
Option Explicit
Private Sub Form_Load()
Randomize
End Sub
Private Sub Command1_Click()
Dim LottoArray(35) As Long, i As Long, num As Long
i = 1
Do Until i > 7
num = Int(Rnd * 35) + 1
If LottoArray(num) = 0 Then
LottoArray(num) = num
i = i + 1
End If
Loop
For i = 1 To 35
If LottoArray(i) <> 0 Then _
Text1.Text = Text1.Text & " " & CStr(LottoArray(i))
Next 'i
End Sub
Mvh
Sven