Hi!
This is the first time that I am actually posting a Thread (after spending a sleepless night trying to debug). Hope I would find a solution here.
I am stuck up in this code.
I am using an excel file with a Question Bank and am displaying the Question in a TextBox on a user form. 4 Possible Answers are displayed using Option Button Captions and am looping thru the same code to display all the questions one by one.
My only problem is that I am unable to make the program wait for user to click on the right option button and submit his reply (command button - with a command_click event captured).
When the question with 4 Options is displayed I want the program to give the user 30 secs (should be displayed in a timer) to click on any of the options and then click on Submit command. The program simply loops thru the code.
Any help would be highly appreciated.
Private Sub LoadQuiz()
Mkr = ""
Dim c As Long
Dim rng As Range
Sheets("Question").Select
x = Cells(Rows.Count, "A").End(xlUp).Row - 1
y = 8
r = 2
Do While r < x
TextBox1.Value = "Question " & r - 1 & " of " & x
TextBox2.Value = Cells(r, 2)
OptionA.Caption = Cells(r, 4)
OptionB.Caption = Cells(r, 5)
OptionC.Caption = Cells(r, 6)
OptionD.Caption = Cells(r, 7)
Me.Show
Application.Wait (Now + TimeValue("00:00:30"))
Loop
End Sub
Bookmarks