#1
|
|||
|
|||
How to program a Check button in a Word 2016 Test/Survey?
Greetings,
I made a CHECK button, that would checks all the answers in my Test/Survey and gives you an result which says that you're either a Good or a Bad person. (e.g. If you have more answer's checked by Option Buttons, that make a count_of_good > count_of_bad, then You'll get a message table, saying that you're a good person. But I want to write the code, which makes the button active, only when every answer is given (e.g. I have 10 questions, and I need to make so, that the checking will start only when all of the 10 questions will be answered, if the conditions will be unacceptable (Not every question is answered) then the user will be notified with a message "You must answer every question, before you can start checking your test) And also I would like to write a code, that shows the count of Good and Bad points (e.g. Answers that define you as a good person - #, Answers that define you as a bad person - #) If someone is familiar with C, the code if written in C would look like this - int main() { int goodcount; int badcount; if (answer 1 = true) { goodcount += 1; } ...Every line of code, for every answer type, including the badcount += 1; printf("The count of good answers: %d \n The count of bad answers: %d", goodcount, badcount); } The main questions - how to program the CHECK button, as I described earlier, and which code should I write, so the count of Good and Bad answers would be displayed, when I press the CHECK button. My current code for the button is here - https://pastebin.com/kEPudyrb Thanks in advance for every advice, which will be given! |
#2
|
||||
|
||||
Without actually seeing the survey document, it is much more difficult for anyone to provide suitable code. Can you attach the document to a post with some representative data (delete anything sensitive)? You do this via the paperclip symbol on the 'Go Advanced' tab at the bottom of this screen.
Quote:
__________________
Cheers, Paul Edstein [Fmr MS MVP - Word] |
Tags |
check button, macro, vba programming |
|
Similar Threads | ||||
Thread | Thread Starter | Forum | Replies | Last Post |
Word 2016 - Where's Sentence length check | RightPaddock | Word | 1 | 08-22-2017 02:30 PM |
VBA Code for Grammar Check Not Working in Word 2016 | PSSMargaret | Word VBA | 2 | 06-11-2016 10:53 PM |
Circling your selection on word vs check box or radio button | NBuckley | Word | 2 | 04-04-2014 03:17 AM |
print vba button in access causes program crash | de_la_espada | Office | 0 | 09-20-2005 04:46 AM |