By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
429,045 Members | 1,305 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 429,045 IT Pros & Developers. It's quick & easy.

Creating a questionnaire, please help!

P: 5
Hi there,

I am learning Visual Basic language through Visual Basic Express 2005, and am unfortunately having a tough time with it - it just doesn't seem to come intuitively to me.

I have to create a psychology questionnaire where the participant is displayed with 5 questions, and they have to select (using radio buttons) how strongly they agree on a scale of 1 to 7. Their score at the end corresponds to the amount their selection adds up to, so there is a maximum of 35 points, and an evalution box will be displayed corresponding with their score.

How do I assign a value to a radio button, and then get Visual Basic to add up the scores? It's probably really simple but I'm really stuck.

Thanks for your help :)
Jan 28 '08 #1
Share this Question
Share on Google+
4 Replies


kadghar
Expert 100+
P: 1,295
...
I have to create a psychology questionnaire where the participant is displayed with 5 questions, and they have to select (using radio buttons) how strongly they agree on a scale of 1 to 7. Their score at the end corresponds to the amount their selection adds up to, so there is a maximum of 35 points, and an evalution box will be displayed corresponding with their score.

How do I assign a value to a radio button, and then get Visual Basic to add up the scores? It's probably really simple but I'm really stuck.
...
Hi!
I think this thread might be of help.
Jan 28 '08 #2

P: 5
Hi!
I think this thread might be of help.
Thank you, that definitely does help. Does anybody know how I can make it mandatory to select at least one radio button for every question?
Jan 29 '08 #3

kadghar
Expert 100+
P: 1,295
Thank you, that definitely does help. Does anybody know how I can make it mandatory to select at least one radio button for every question?
I think with an IF in then click event of your "Next Q" button:

Expand|Select|Wrap|Line Numbers
  1. if optionbox1.value or optionbox2.value or optionbox3.value then
  2.     'Code for going to next Q
  3. else
  4.     msgbox ("Please answer")
  5. end if
HTH
Jan 30 '08 #4

P: 5
got it! thank you very much :)
Jan 30 '08 #5

Post your reply

Sign in to post your reply or Sign up for a free account.