Unanswered: VBA method to create dynamic Questionnaire
Can anybody give me some advise as to what is the best method to generate a dynamic questionnaire/survey in Excel using VBA or point me in a good direction as to where I will be able to find similar examples on the web.
This is what I need to acheive and have already been able to implement:
I have used VBA code to connect to my external database and draw down the information for each survey so that each survey is presented is a seperate worksheet listing the question numbers, question and percentage worth values.
What I am failing to understand is to how I would be able to generate a radio button for each question and also how I would be able to validate the radios. Another main function that I will need to provide is the ability to draw back the results from each of the surveys (in each worksheet) and tie them together to create a barchart of results.
To achieve these goal am I best to create worksheets or create forms from within the VBA environment?
Howdy. Sounds like maybe designing your own UserForm would give you most of what you want - you could use radio buttons or check boxes. By going this route you will have built in ways of referring to the data, and can pull it directly into a summary. This also gives you the best control over the user experience.
As for the summary, you could design it to put into another hidden worksheet, then use code to create a Pivot Table, or whatever else you might find best for your needs.
An excellent resource for all of this is the book VBA and Macros for Microsoft Excel by Bill Jelen [MrExcel], et al. The book provides code for UserForms and Pivot Tables, and then gives advice on best practices.
old, slow, and confused
but at least I'm inconsistent!