Hi all,
While learning for an exam I have to take, I decided to make a multiple choice quiz to help me train.
quiz.xlsm
I have some VBA knowledge but not enough to work everything out myself. And the things I have made may be improved. I should probably have used userforms but I have not yet learned how to use those yet :p
What I want to make is a ten question quiz. Each question should have three answers. One that is right and two others chosen at random from the available answers.
For each chapter I need to learn I have a column with questions and a column with answers. There's multiple chapters.
I'm still trying to figure out the following issues:
- How do I dynamically assign the sheet that the data is chosen from (depending on the desired chapter) in my code? I tried
but it doesn't seem to work because B12 is data from a dropdown list. I'm also unsure if I should concatenate double quotes before and after the cell value to make it work. - How do I randomly choose the two wrong answers from the available range of answers, WITHOUT including the previously selected right answer (and for the second wrong answer, the firstly chosen wrong answer?)
- How do I put the three answers (1 right, two wrong) in random order in three cells? Right now the correct answer is always on the top of the list.
- How should I design the answering mechanic. Right now clicking an answer button changes a corresponding cell from 0 to 1. But I don't know how this should trigger the code that evaluates the answer.
Especially since at this moment the score is kept in the same code that picks the questions.
See attachment for entire project. Main code (module 1) :
Bookmarks