+ Reply to Thread
Results 1 to 8 of 8

Developing a Quiz Application using VB and Excel - Unable to halt the loop to enable Input

  1. #1
    Registered User
    Join Date
    09-09-2014
    Location
    India
    MS-Off Ver
    2007
    Posts
    4

    Developing a Quiz Application using VB and Excel - Unable to halt the loop to enable Input

    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.


    Please Login or Register  to view this content.
    [/I]
    Last edited by Fotis1991; 11-25-2014 at 03:31 AM. Reason: pLS USE CODE TAGS AROUND YOUR CODES!

  2. #2
    Forum Contributor
    Join Date
    09-05-2012
    Location
    Dubai
    MS-Off Ver
    Office 365
    Posts
    409

    Re: Developing a Quiz Application using VB and Excel - Unable to halt the loop to enable I

    Hello Bhutaniv.... Welcome....

    Would Appreciate if you can post your excel data... for better understanding.....


    regards

  3. #3
    Registered User
    Join Date
    09-09-2014
    Location
    India
    MS-Off Ver
    2007
    Posts
    4

    Re: Developing a Quiz Application using VB and Excel - Unable to halt the loop to enable I

    Thanks for the prompt reply. I am enclosing the Excel File. i am referring to User Form - Quiz. In the LoadQuiz module I have disabled loop because it goes into a permanent loop.

    Regards
    Vineet
    Attached Files Attached Files

  4. #4
    Forum Contributor
    Join Date
    09-05-2012
    Location
    Dubai
    MS-Off Ver
    Office 365
    Posts
    409

    Re: Developing a Quiz Application using VB and Excel - Unable to halt the loop to enable I

    Hi, I haven't understand your program...
    as a far as I understand you basically have 9 questions to ask users right on the userform
    which after clicking submit button it will move on to next question right ?

    and you are giving total of 30 seconds to answer 9 questions or each questions has 30 secs..
    and you already have a predefined questions sheet with answers and if user answer is matched with your sheet you are giving 10 marks for each question right ? and all these info to be added to score sheet..... ?

  5. #5
    Registered User
    Join Date
    09-09-2014
    Location
    India
    MS-Off Ver
    2007
    Posts
    4

    Re: Developing a Quiz Application using VB and Excel - Unable to halt the loop to enable I

    as a far as I understand you basically have 9 questions to ask users right on the userform
    which after clicking submit button it will move on to next question right ? - Yes

    and you are giving total of 30 seconds to answer 9 questions or each questions has 30 secs.. - Each Question has 30 secs.

    and you already have a predefined questions sheet with answers and if user answer is matched with your sheet you are giving 10 marks for each question right ? and all these info to be added to score sheet..... ? - Yes.

    It is programmed that way - but the problem is that I am unable to take user input while the loop is being executed.

  6. #6
    Forum Contributor
    Join Date
    09-05-2012
    Location
    Dubai
    MS-Off Ver
    Office 365
    Posts
    409

    Re: Developing a Quiz Application using VB and Excel - Unable to halt the loop to enable I

    Hi Just only run userform Initialize ... and check.. might you need to add time value also for iteration of question.
    Attached Files Attached Files

  7. #7
    Registered User
    Join Date
    09-09-2014
    Location
    India
    MS-Off Ver
    2007
    Posts
    4

    Re: Developing a Quiz Application using VB and Excel - Unable to halt the loop to enable I

    Wow!!! Amazing....Thanks a lot for the help extended. I really appreciate this. :-)

    How can I set a timer (30 secs) for each question? is it possible to display the timer on the user form so that the user knows how much time is left for him to answer?

  8. #8
    Forum Contributor
    Join Date
    09-05-2012
    Location
    Dubai
    MS-Off Ver
    Office 365
    Posts
    409

    Re: Developing a Quiz Application using VB and Excel - Unable to halt the loop to enable I

    Hi.
    Pls check now.... logically what I felt, I made... this is what I can help you....
    Attached Files Attached Files

+ Reply to Thread

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Similar Threads

  1. [SOLVED] Halt macro - wait for user input
    By The Skipper in forum Excel Programming / VBA / Macros
    Replies: 4
    Last Post: 07-30-2013, 03:26 PM
  2. Unable to export image to excel from web application
    By just swathi in forum Excel Programming / VBA / Macros
    Replies: 0
    Last Post: 11-24-2011, 09:47 AM
  3. Excel Application Unable to Connect the High available (Mirroring) database
    By satish0680 in forum Excel Programming / VBA / Macros
    Replies: 0
    Last Post: 01-25-2010, 07:44 PM
  4. Input parameters to an excel Application
    By eitancoh in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 04-22-2007, 06:35 PM
  5. [SOLVED] Developing in 2000 for 2002 application; problems?
    By Sandy in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 08-27-2005, 01:05 AM

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts

Search Engine Friendly URLs by vBSEO 3.6.0 RC 1