ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Programming (https://www.excelbanter.com/excel-programming/)
-   -   Creating a Dynamic Questionaire (https://www.excelbanter.com/excel-programming/386010-re-creating-dynamic-questionaire.html)

JLatham

Creating a Dynamic Questionaire
 
When you say "create a form" do you mean to have the controls (radio buttons,
checkboxes, text boxes) actually on an Excel worksheet, or are you thinking
of a UserForm? If you don't know what I'm talking about when I say UserForm,
then the answer is probably "worksheet".

The answer is yes in both cases, but which method you're using determines
how the values from the controls are obtained and processed.

If you plan on setting this all up directly on a worksheet, the way I prefer
to do it is to use the controls from the [Forms] toolbar. To get to that
toolbar, display it from the Excel menu: [View] | [Toolbars] | "Forms"
You just click on a control, and then click on the sheet to put one there
and format it up. One of the properties of the Radio buttons and Checkboxes
(on their [Control] tab in the properties dialog for each) is what cell they
are associated with. When you make a change to the control, the results are
reflected in that cell. By pushing a value to the related cell you can
change the value of the control.

You can set your radio/check boxes up that way, then for text entries, just
set up to have the users type directly into a cell on the sheet.

Handling controls on Userforms is done differently.

As for having a macro decide what to do next, given some change in one of
the cells or a click of a button - yes that can be done via code also. Easy
way is to have a command button that when clicked takes you to the next step.
It could even make a decision based on some value in one of the responses
given. Another way to just suddenly jump to another location in the workbook
would be to use the worksheet's _Change() event handler to detect a change in
a particular cell and take action based on the results of evaluating the
change.

"jb" wrote:

Hi there,

I'm trying to create a dynamic questionaire on an excel spreadsheet. I'm
wondering:

1) Is it possible to create a form with questions and:
a) radio or check boxes, and b) text boxes for user input.

2) If so, how do I get information in and out of these check boxes,

3) Using a Macro to decide which form to go to next.




All times are GMT +1. The time now is 02:06 PM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
ExcelBanter.com