I'm trying to make a lotto 649 program. There are 49 checkboxes for the user to select numbers to make a ticket. When the user hits the submit button, the program should output the six numbers to the same line in a listbox. How do you do this? For example, if the user decides to purchase two tickets, I'd like the output of the listbox to look like this:

1) 4, 49, 24, 22, 30, 9
2) 47, 32, 30, 3, 1, 5

Code:
Private Sub cmdSubmit_Click()

Static t As Integer
t = t + 1

For i = 0 To 6

If optNum(i).Value = 1 Then
    List1.AddItem t & ") " & optNum(i).Caption
End If

Next

End Sub