The problem I have is that when I print a match list out once or twice they are all the same combination of names. I need a combination of names to be able to only be used twice and not 4 times.
I.e. of how it comes out at mo
Match list 1
brad VS charlie
Match list 2
brad VS Charlie
match list 3
Brad VS Charlie
match list 4
brad VS charlie
I.e. of how it should be
match list 1
brad VS charlie
match list 2
Brad VS helen
Match list 3
Brad VS charlie
match lsit 4
Brad VS egga
each of the match lists would be on sperate pages and would have 18 names in total to them this is the code I have so far produced for it:
CODE
dim stryellowused as string
strYellowUsed = String(18, "0")
For m = 1 To 4
For i = 1 To 72
For j = 1 To 72
If green_array(i, 2) <> yellow_array(j, 2) And Mid(strYellowUsed, j, 1) = "0" Then
'yellow_array(j, 2) differs from green_array(i, 2) and hasn't been selected before
Printer.Print green_array(i, 1), "Vs", yellow_array(j, 1)
Print EndDoc
'Set flag to prevent yellow_array(j, 2) being selected again
Mid(strYellowUsed, j, 1) = "1"
'Exit the "For j = 1 to 18" loop so that we can process the next green_array element
Exit For
End If
Next j
Next i
Printer.NewPage
Next m
strYellowUsed = String(18, "0")
For m = 1 To 4
For i = 1 To 72
For j = 1 To 72
If green_array(i, 2) <> yellow_array(j, 2) And Mid(strYellowUsed, j, 1) = "0" Then
'yellow_array(j, 2) differs from green_array(i, 2) and hasn't been selected before
Printer.Print green_array(i, 1), "Vs", yellow_array(j, 1)
Print EndDoc
'Set flag to prevent yellow_array(j, 2) being selected again
Mid(strYellowUsed, j, 1) = "1"
'Exit the "For j = 1 to 18" loop so that we can process the next green_array element
Exit For
End If
Next j
Next i
Printer.NewPage
Next m
But this produces only one set of the results I want and four blank pages...
the thing I cant get around is how to stop one combination of names appearing in more than two games I tried using a falg like the stryellowused but it was no use...does anyone have any ideas..I was thinking that the entire row the would be printed out neds to be stored and have a variable added to it like 1 to process wehter its been used once but Im not a vb programmer and I dont really like vb lol...
PLZ help this has been bugging me for so long
thanks,
sammaye

