I have seen a lot of people doing what you first stated as a possibility by using arrays to check which question was already selected, but I have never tried working with arrays so I was kinda lost when I tried using them to fit my program. And as for what you stated as the best possibility, using the boolean, object and string together, how would I go about doing that. I'm kind of a beginner when it comes to visual basic. Anyway, here is what I have tired to do following your advice.
CODE
Private Sub nextfourtynorepeat()
Dim qselected As Boolean
Dim questionvalue As Integer
Dim q1 As New Object
Dim q2 As New Object
Dim q3 As New Object
Dim q4 As New Object
Dim q5 As New Object
Dim q6 As New Object
Dim q7 As New Object
Dim q8 As New Object
Dim q9 As New Object
Dim q10 As New Object
Dim q11 As New Object
Dim q12 As New Object
Dim q13 As New Object
Dim q14 As New Object
Dim q15 As New Object
Dim q16 As New Object
Dim q17 As New Object
Dim q18 As New Object
Dim q19 As New Object
Dim q20 As New Object
Dim q21 As New Object
Dim q22 As New Object
Dim q23 As New Object
Dim q24 As New Object
Dim q25 As New Object
Dim q26 As New Object
Dim q27 As New Object
Dim q28 As New Object
Dim q29 As New Object
Dim q30 As New Object
Dim q31 As New Object
Dim q32 As New Object
Dim q33 As New Object
Dim q34 As New Object
Dim q35 As New Object
Dim q36 As New Object
Dim q37 As New Object
Dim q38 As New Object
Dim q39 As New Object
Dim q40 As New Object
Dim q41 As New Object
Dim q42 As New Object
Dim q43 As New Object
Dim q44 As New Object
Dim q45 As New Object
Dim q46 As New Object
Dim q47 As New Object
Dim q48 As New Object
Dim q49 As New Object
Dim q50 As New Object
Dim q51 As New Object
Dim q52 As New Object
Dim q53 As New Object
Dim q54 As New Object
Dim q55 As New Object
Dim q56 As New Object
Dim q57 As New Object
Dim q58 As New Object
Dim q59 As New Object
Dim q60 As New Object
Dim q61 As New Object
Dim q62 As New Object
Dim q63 As New Object
Dim q64 As New Object
Dim q65 As New Object
Dim q66 As New Object
Dim q67 As New Object
Start:
Questionvalue = Int(Rnd() * 67) + 1
If Questionvalue = 1 Then
If q1.qselected = True Then
GoTo start
End If
If q1.qselected = False Then
q1.qselected = True
nextnorepeat()
End If
End If
If Questionvalue = 2 Then
If q2.qselected = True Then
GoTo start
End If
If q2.qselected = False Then
q2.qselected = True
nextnorepeat()
End If
End If
If Questionvalue = 3 Then
If q3.qselected = True Then
GoTo start
End If
If q3.qselected = False Then
q3.qselected = True
nextnorepeat()
End If
End If
If Questionvalue = 4 Then
If q4.qselected = True Then
GoTo start
End If
If q4.qselected = False Then
q4.qselected = True
nextnorepeat()
End If
End If
If Questionvalue = 5 Then
If q5.qselected = True Then
GoTo start
End If
If q5.qselected = False Then
q5.qselected = True
nextnorepeat()
End If
End If
If Questionvalue = 6 Then
If q6.qselected = True Then
GoTo start
End If
If q6.qselected = False Then
q6.qselected = True
nextnorepeat()
End If
End If
If Questionvalue = 7 Then
If q7.qselected = True Then
GoTo start
End If
If q7.qselected = False Then
q7.qselected = True
nextnorepeat()
End If
End If
If Questionvalue = 8 Then
If q8.qselected = True Then
GoTo start
End If
If q8.qselected = False Then
q8.qselected = True
nextnorepeat()
End If
End If
If Questionvalue = 9 Then
If q9.qselected = True Then
GoTo start
End If
If q9.qselected = False Then
q9.qselected = True
nextnorepeat()
End If
End If
If Questionvalue = 10 Then
If q10.qselected = True Then
GoTo Start
End If
If q10.qselected = False Then
q10.qselected = True
nextnorepeat()
End If
End If
If Questionvalue = 11 Then
If q11.qselected = True Then
GoTo start
End If
If q11.qselected = False Then
q11.qselected = True
nextnorepeat()
End If
End If
If Questionvalue = 12 Then
If q12.qselected = True Then
GoTo start
End If
If q12.qselected = False Then
q12.qselected = True
nextnorepeat()
End If
End If
If Questionvalue = 13 Then
If q13.qselected = True Then
GoTo start
End If
If q13.qselected = False Then
q13.qselected = True
nextnorepeat()
End If
End If
If Questionvalue = 14 Then
If q14.qselected = True Then
GoTo start
End If
If q14.qselected = False Then
q14.qselected = True
nextnorepeat()
End If
End If
If Questionvalue = 15 Then
If q15.qselected = True Then
GoTo start
End If
If q15.qselected = False Then
q15.qselected = True
nextnorepeat()
End If
End If
If Questionvalue = 16 Then
If q16.qselected = True Then
GoTo start
End If
If q16.qselected = False Then
q16.qselected = True
nextnorepeat()
End If
End If
If Questionvalue = 17 Then
If q17.qselected = True Then
GoTo start
End If
If q17.qselected = False Then
q17.qselected = True
nextnorepeat()
End If
End If
If Questionvalue = 18 Then
If q18.qselected = True Then
GoTo start
End If
If q18.qselected = False Then
q18.qselected = True
nextnorepeat()
End If
End If
If Questionvalue = 19 Then
If q19.qselected = True Then
GoTo start
End If
If q19.qselected = False Then
q19.qselected = True
nextnorepeat()
End If
End If
If Questionvalue = 20 Then
If q20.qselected = True Then
GoTo start
End If
If q20.qselected = False Then
q20.qselected = True
nextnorepeat()
End If
End If
If Questionvalue = 21 Then
If q21.qselected = True Then
GoTo start
End If
If q21.qselected = False Then
q21.qselected = True
nextnorepeat()
End If
End If
If Questionvalue = 22 Then
If q22.qselected = True Then
GoTo start
End If
If q22.qselected = False Then
q22.qselected = True
nextnorepeat()
End If
End If
If Questionvalue = 23 Then
If q23.qselected = True Then
GoTo start
End If
If q23.qselected = False Then
q23.qselected = True
nextnorepeat()
End If
End If
If Questionvalue = 24 Then
If q24.qselected = True Then
GoTo start
End If
If q24.qselected = False Then
q24.qselected = True
nextnorepeat()
End If
End If
If Questionvalue = 25 Then
If q25.qselected = True Then
GoTo start
End If
If q25.qselected = False Then
q25.qselected = True
nextnorepeat()
End If
End If
If Questionvalue = 26 Then
If q26.qselected = True Then
GoTo start
End If
If q26.qselected = False Then
q26.qselected = True
nextnorepeat()
End If
End If
If Questionvalue = 27 Then
If q27.qselected = True Then
GoTo start
End If
If q27.qselected = False Then
q27.qselected = True
nextnorepeat()
End If
End If
If Questionvalue = 28 Then
If q28.qselected = True Then
GoTo start
End If
If q28.qselected = False Then
q28.qselected = True
nextnorepeat()
End If
End If
If Questionvalue = 29 Then
If q29.qselected = True Then
GoTo start
End If
If q29.qselected = False Then
q29.qselected = True
nextnorepeat()
End If
End If
If Questionvalue = 30 Then
If q30.qselected = True Then
GoTo start
End If
If q30.qselected = False Then
q30.qselected = True
nextnorepeat()
End If
End If
If Questionvalue = 31 Then
If q31.qselected = True Then
GoTo start
End If
If q31.qselected = False Then
q31.qselected = True
nextnorepeat()
End If
End If
If Questionvalue = 32 Then
If q32.qselected = True Then
GoTo start
End If
If q32.qselected = False Then
q32.qselected = True
nextnorepeat()
End If
End If
If Questionvalue = 33 Then
If q33.qselected = True Then
GoTo start
End If
If q33.qselected = False Then
q33.qselected = True
nextnorepeat()
End If
End If
If Questionvalue = 34 Then
If q34.qselected = True Then
GoTo start
End If
If q34.qselected = False Then
q34.qselected = True
nextnorepeat()
End If
End If
If Questionvalue = 35 Then
If q35.qselected = True Then
GoTo start
End If
If q35.qselected = False Then
q35.qselected = True
nextnorepeat()
End If
End If
If Questionvalue = 36 Then
If q36.qselected = True Then
GoTo start
End If
If q36.qselected = False Then
q36.qselected = True
nextnorepeat()
End If
End If
If Questionvalue = 37 Then
If q37.qselected = True Then
GoTo start
End If
If q37.qselected = False Then
q37.qselected = True
nextnorepeat()
End If
End If
If Questionvalue = 38 Then
If q38.qselected = True Then
GoTo start
End If
If q38.qselected = False Then
q38.qselected = True
nextnorepeat()
End If
End If
If Questionvalue = 39 Then
If q39.qselected = True Then
GoTo start
End If
If q39.qselected = False Then
q39.qselected = True
nextnorepeat()
End If
End If
If Questionvalue = 40 Then
If q40.qselected = True Then
GoTo start
End If
If q40.qselected = False Then
q40.qselected = True
nextnorepeat()
End If
End If
If Questionvalue = 41 Then
If q41.qselected = True Then
GoTo start
End If
If q41.qselected = False Then
q41.qselected = True
nextnorepeat()
End If
End If
If Questionvalue = 42 Then
If q42.qselected = True Then
GoTo start
End If
If q42.qselected = False Then
q42.qselected = True
nextnorepeat()
End If
End If
If Questionvalue = 43 Then
If q43.qselected = True Then
GoTo start
End If
If q43.qselected = False Then
q43.qselected = True
nextnorepeat()
End If
End If
If Questionvalue = 44 Then
If q44.qselected = True Then
GoTo start
End If
If q44.qselected = False Then
q44.qselected = True
nextnorepeat()
End If
End If
If Questionvalue = 45 Then
If q45.qselected = True Then
GoTo start
End If
If q45.qselected = False Then
q45.qselected = True
nextnorepeat()
End If
End If
If Questionvalue = 46 Then
If q46.qselected = True Then
GoTo start
End If
If q46.qselected = False Then
q46.qselected = True
nextnorepeat()
End If
End If
If Questionvalue = 47 Then
If q47.qselected = True Then
GoTo start
End If
If q47.qselected = False Then
q47.qselected = True
nextnorepeat()
End If
End If
If Questionvalue = 48 Then
If q48.qselected = True Then
GoTo start
End If
If q48.qselected = False Then
q48.qselected = True
nextnorepeat()
End If
End If
If Questionvalue = 49 Then
If q49.qselected = True Then
GoTo start
End If
If q49.qselected = False Then
q49.qselected = True
nextnorepeat()
End If
End If
If Questionvalue = 50 Then
If q50.qselected = True Then
GoTo start
End If
If q50.qselected = False Then
q50.qselected = True
nextnorepeat()
End If
End If
If Questionvalue = 51 Then
If q51.qselected = True Then
GoTo start
End If
If q51.qselected = False Then
q51.qselected = True
nextnorepeat()
End If
End If
If Questionvalue = 52 Then
If q52.qselected = True Then
GoTo start
End If
If q52.qselected = False Then
q52.qselected = True
nextnorepeat()
End If
End If
If Questionvalue = 53 Then
If q53.qselected = True Then
GoTo start
End If
If q53.qselected = False Then
q53.qselected = True
nextnorepeat()
End If
End If
If Questionvalue = 54 Then
If q54.qselected = True Then
GoTo start
End If
If q54.qselected = False Then
q54.qselected = True
nextnorepeat()
End If
End If
If Questionvalue = 55 Then
If q55.qselected = True Then
GoTo start
End If
If q55.qselected = False Then
q55.qselected = True
nextnorepeat()
End If
End If
If Questionvalue = 56 Then
If q56.qselected = True Then
GoTo start
End If
If q56.qselected = False Then
q56.qselected = True
nextnorepeat()
End If
End If
If Questionvalue = 57 Then
If q57.qselected = True Then
GoTo start
End If
If q57.qselected = False Then
q57.qselected = True
nextnorepeat()
End If
End If
If Questionvalue = 58 Then
If q58.qselected = True Then
GoTo start
End If
If q58.qselected = False Then
q58.qselected = True
nextnorepeat()
End If
End If
If Questionvalue = 59 Then
If q59.qselected = True Then
GoTo start
End If
If q59.qselected = False Then
q59.qselected = True
nextnorepeat()
End If
End If
If Questionvalue = 60 Then
If q60.qselected = True Then
GoTo start
End If
If q60.qselected = False Then
q60.qselected = True
nextnorepeat()
End If
End If
If Questionvalue = 61 Then
If q61.qselected = True Then
GoTo start
End If
If q61.qselected = False Then
q61.qselected = True
nextnorepeat()
End If
End If
If Questionvalue = 62 Then
If q62.qselected = True Then
GoTo start
End If
If q62.qselected = False Then
q62.qselected = True
nextnorepeat()
End If
End If
If Questionvalue = 63 Then
If q63.qselected = True Then
GoTo start
End If
If q63.qselected = False Then
q63.qselected = True
nextnorepeat()
End If
End If
If Questionvalue = 64 Then
If q64.qselected = True Then
GoTo start
End If
If q64.qselected = False Then
q64.qselected = True
nextnorepeat()
End If
End If
If Questionvalue = 65 Then
If q65.qselected = True Then
GoTo start
End If
If q65.qselected = False Then
q65.qselected = True
nextnorepeat()
End If
End If
If Questionvalue = 66 Then
If q66.qselected = True Then
GoTo start
End If
If q66.qselected = False Then
q66.qselected = True
nextnorepeat()
End If
End If
If Questionvalue = 67 Then
If q67.qselected = True Then
GoTo start
End If
If q67.qselected = False Then
q67.qselected = True
nextnorepeat()
End If
End If
End Sub
This post has been edited by DjVw321: 26 Jun, 2008 - 06:06 AM