|
-
Apr 5th, 2000, 11:47 PM
#1
Thread Starter
Lively Member
Hi all! I've searched thru the archives but couldn't find anything on my problem. This is SO embarassing! but I can't get this Do Loop to do what I want it to!
I’m (still) working on a test for new employees, consisting of 15 questions. The employee can check a “mark” checkbox to review any questions he has doubts about after finishing the test.
What I want to do is when the “REVIEW” command button is clicked, is to cycle thru the array of 15 questions and present the first question that has been “marked”. Then when he clicks on it again, he goes to the next “marked” question, and so on…continuing around the whole test if necessary. My code so far is this:
Do While TestArray(QuestionNumber, 5) <> "Y" ‘ ELEMENT for marked checkbox, Y means its checked
QuestionNumber = QuestionNumber + 1
Loop
Textbox2.text = TestArray(QuestionNumber, 2)
Textbox3.text = TestArray(QuestionNumber, 3)
Textbox4.text = TestArray(QuestionNumber, 4)
Textbox5.text = TestArray(QuestionNumber, 5)
Check1.Value = vbChecked
QuestionNumber = QuestionNumber + 1
What I WANT to happen is that the user will “cycle” thru the test seeing every q uestion he has marked, from the first to the last. BUT I keep getting out of bounds error, i.e. QuestionNumber ends up being higher than 15 so it bombs out! Any ideas from you DO Loop experts(obviously, which I am not <sg>).
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|