Nick Koutras
Member
A faster sub to display combinations
is the subroutine below.
It is a recursive one and can handle *all*
the Lotto Games
Sub combinations(Start As Long, N As Long, K As Long, maxk As Long)
Dim i As Long
If K > maxk Then
Combo_Index = Combo_Index + 1
'/ add code below to do what you wish
'/ save combination...
'/ test combination...
Else
For i = Start To N
Row(K) = CByte(i)
'recursively generate combinations from i+1...n
Call combinations(i + 1, N, K + 1, maxk)
Next
End If
End Sub
If anybody wants more info for it's implementation just post yor request.
is the subroutine below.
It is a recursive one and can handle *all*
the Lotto Games
Sub combinations(Start As Long, N As Long, K As Long, maxk As Long)
Dim i As Long
If K > maxk Then
Combo_Index = Combo_Index + 1
'/ add code below to do what you wish
'/ save combination...
'/ test combination...
Else
For i = Start To N
Row(K) = CByte(i)
'recursively generate combinations from i+1...n
Call combinations(i + 1, N, K + 1, maxk)
Next
End If
End Sub
If anybody wants more info for it's implementation just post yor request.