+ Reply to Thread
Results 1 to 3 of 3

Help creating a Test using VBA and option buttons

  1. #1
    Registered User
    Join Date
    02-04-2010
    Location
    North Carolina
    MS-Off Ver
    Excel 2007
    Posts
    52

    Help creating a Test using VBA and option buttons

    Greetings,

    I am not very savvy on VBA. I am trying to create a test in excel using option buttons. What I would like is:

    1) A score button that only the examiner has access to (password protected). Once the score button is pressed, it will populate the total score in the appropriate field.

    2) Ability to list which questions were answered incorrectly. (Only once "Score" button pressed)

    3)Ability to reset the test by clicking on the image (password protected)

    A few additions.
    -This will be a template for other tests.
    -Number of questions may change
    -Not all questions will have 4 answers
    -Will be printing the test
    -If an answer sheet is needed, then will need to hide the sheet until admin password is entered.
    -Needs to be done in excel

    I know this is a lot to ask, but if anyone can help in the creation of this, I appreciate it. I am trying to create it myself, but again, I am not VBA smart.

    Thank you
    Attached Files Attached Files

  2. #2
    Valued Forum Contributor
    Join Date
    06-16-2006
    Location
    Sydney, Australia
    MS-Off Ver
    2013 64bit
    Posts
    1,394

    Re: Help creating a Test using VBA and option buttons

    I think this is a big ask (as you have hinted). How about you take a different approach that doesn't use VBA so you can do it yourself.

    1. Forget about your radio buttons.
    2. add an answer column next to your questions, and ask the user to enter a, b, c or d. You can use DATA\Validation to prevent them entering anything else.
    3. create a correct answer column with the right answer in it ie a, b, c or d.
    4. create score column that uses a formula against each question to check their answer vs the right answer using a simple "if" statement. Give them 1 point (say) for a right answer and zero for wrong.
    5. hide the correct answer column and the score column.
    6. Protect the workbook so they can't unhide the hidden columns.

    Someone will surely help you with a couple of macros to hide/unhide the columns when you have something close to finished.

    Would that work?

  3. #3
    Forum Contributor arlu1201's Avatar
    Join Date
    09-09-2011
    Location
    Bangalore, India
    MS-Off Ver
    Excel 2003 & 2007
    Posts
    19,167

    Re: Help creating a Test using VBA and option buttons

    This is a pretty big request in one chunk. I'm sure you'll get better response if you break down your question into several parts, so that they can be tackled one after the other.

    Also, we're happy to help you with your effort, but nobody here will be keen on developing a solution from scratch. This forum is about helping people learn how to use Excel, not a free development service.

    Have you started any work on this project yet?
    How far did you get?
    Where are you stuck?

    We can help you develop your own code, but if you want someone to code this for you all the way, you should try and find a commercial developer.
    If I have helped, Don't forget to add to my reputation (click on the star below the post)
    Don't forget to mark threads as "Solved" (Thread Tools->Mark thread as Solved)
    Use code tags when posting your VBA code: [code] Your code here [/code]

+ Reply to Thread

Thread Information

Users Browsing this Thread

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

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