Hello!
I'm making a survey that requires a response on every question. I have everything coded in VBA so that when an answer is selected on a check box all results are tabulated. However, I'm at a loss as to how I would create a button that interrogates the entire survey to ensure an answer has been selected for every question. If there is a question missing an answer, a message box should pop up. I tried using this IF statement, but it just makes the message box pop up every time I click the command button, whether the check boxes are selected or not.
If (FIVE_fiveAcheck = False And FOUR_fiveAcheck = False And THREE_fiveAcheck = False And TWO_fiveAcheck = False And ONE_fiveAcheck = False And IE_fiveAcheck = False) Then MsgBox "Please select a rating for question 1.a)"
FYI it's ITEM_questionPARTcheck (as in check box)
I figured evaluating each question part (A or B) as a set would be the best way to approach it.
Alternatively, a button that evaluates the whole document for questions without an answer and provides a generic "please answer all questions" would be fine.
Thanks in advance for any help at all! I just started learning VBA yesterday so, much appreciated.
I'm making a survey that requires a response on every question. I have everything coded in VBA so that when an answer is selected on a check box all results are tabulated. However, I'm at a loss as to how I would create a button that interrogates the entire survey to ensure an answer has been selected for every question. If there is a question missing an answer, a message box should pop up. I tried using this IF statement, but it just makes the message box pop up every time I click the command button, whether the check boxes are selected or not.
If (FIVE_fiveAcheck = False And FOUR_fiveAcheck = False And THREE_fiveAcheck = False And TWO_fiveAcheck = False And ONE_fiveAcheck = False And IE_fiveAcheck = False) Then MsgBox "Please select a rating for question 1.a)"
FYI it's ITEM_questionPARTcheck (as in check box)
I figured evaluating each question part (A or B) as a set would be the best way to approach it.
Alternatively, a button that evaluates the whole document for questions without an answer and provides a generic "please answer all questions" would be fine.
Thanks in advance for any help at all! I just started learning VBA yesterday so, much appreciated.