Microsoft Office Forums

Go Back   Microsoft Office Forums > >

Reply
 
Thread Tools Display Modes
  #1  
Old 10-18-2017, 12:43 AM
Erniks Erniks is offline How to program a Check button in a Word 2016 Test/Survey? Windows 8 How to program a Check button in a Word 2016 Test/Survey? Office 2016
Novice
How to program a Check button in a Word 2016 Test/Survey?
 
Join Date: Oct 2017
Posts: 1
Erniks is on a distinguished road
Question 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!
Reply With Quote
  #2  
Old 10-18-2017, 12:55 AM
macropod's Avatar
macropod macropod is offline How to program a Check button in a Word 2016 Test/Survey? Windows 7 64bit How to program a Check button in a Word 2016 Test/Survey? Office 2010 32bit
Administrator
 
Join Date: Dec 2010
Location: Canberra, Australia
Posts: 21,956
macropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond repute
Default

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:
Originally Posted by Erniks View Post
My current code for the button is here - https://pastebin.com/kEPudyrb
Instead of sending users elsewhere to look at your code, kindly post it here. And, when posting code, please use the code tags - indicated by the # button on the posting menu.
__________________
Cheers,
Paul Edstein
[Fmr MS MVP - Word]
Reply With Quote
Reply

Tags
check button, macro, vba programming

Thread Tools
Display Modes


Similar Threads
Thread Thread Starter Forum Replies Last Post
How to program a Check button in a Word 2016 Test/Survey? Word 2016 - Where's Sentence length check RightPaddock Word 1 08-22-2017 02:30 PM
How to program a Check button in a Word 2016 Test/Survey? VBA Code for Grammar Check Not Working in Word 2016 PSSMargaret Word VBA 2 06-11-2016 10:53 PM
How to program a Check button in a Word 2016 Test/Survey? 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

Other Forums: Access Forums

All times are GMT -7. The time now is 03:36 PM.


Powered by vBulletin® Version 3.8.11
Copyright ©2000 - 2024, vBulletin Solutions Inc.
Search Engine Optimisation provided by DragonByte SEO (Lite) - vBulletin Mods & Addons Copyright © 2024 DragonByte Technologies Ltd.
MSOfficeForums.com is not affiliated with Microsoft