+ Reply to Thread
Results 1 to 2 of 2

Coding for Pop-up boxes based on responses to Yes/No Radio buttons

  1. #1
    Registered User
    Join Date
    07-05-2012
    Location
    Atlanta, Georgia
    MS-Off Ver
    Excel 2008
    Posts
    2

    Coding for Pop-up boxes based on responses to Yes/No Radio buttons

    I have a series of yes/no questions for a survey for which the surveyee needs to select a "Yes" or "No" radio button. If they select the "No" radio button for the first, required question, the surveyee would not need to select any radio button for the next say, 3 questions because they wouldn't apply. I want to code so that if they select "No" for that first required question, and then try to answer any of the next three questions, a pop-up window would appear saying "Do not answer this question if you answered No to question 1." I know this requires some coding so what would that code be and where would I enter it? If not a pop-up box, would it be possible to do some sort of skip pattern where if they answer "No" to first question, they are automatically skipped to the next relevant question to them?

    Also, I would like some of the questions to be required so how do I make it so that if the surveyee skips one of these required questions, a pop-up window appears to let them know they need to answer the required question. But I want to make sure they can save the survey at any point before completing it.

    I have set up the yes no radio buttons for each question and linked them to a cell in a separate column which indicates "1" if they answered "Yes" and "2" if they answered "No" and "0" if unselected.

    Please help! Thanks in advance.

  2. #2
    Valued Forum Contributor smuzoen's Avatar
    Join Date
    10-28-2011
    Location
    Brisbane, Australia
    MS-Off Ver
    Excel 2003/2007/2010
    Posts
    610

    Re: Coding for Pop-up boxes based on responses to Yes/No Radio buttons

    You could use something similar to this - it is a really basic example but it will give you the general idea - based on the answers you can code for which questions show up - so you can dictate an order or have free method of answering as long as you get the logic right. It is based on having the labels and controls visible or hidden - depending on the answers to the questions then the next set of questions show up by making the controls on the form visible - as I say this is really basic however it is for illustrative purposes. I won't post the code as it is nothing special - have a look at the attached workbook and you will get the idea - all the code is basically in the userform. If you need any help just shout.
    Attached Files Attached Files
    Hope this helps.
    Anthony
    Pack my box with five dozen liquor jugs
    PS: Remember to mark your questions as Solved once you are satisfied. Please rate the answer(s) by selecting the Star in the lower left next to the Triangle. It is appreciated?

+ Reply to Thread

Thread Information

Users Browsing this Thread

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

Tags for this Thread

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