#1   Report Post  
John
 
Posts: n/a
Default Survey Form

Hello,

I want to take a poll with approx 5 answer options displayed as radio
buttons or check marks. i.e. Options are Monday, Tuesday, Wednesday,
Thursday, Friday, When all users answer, I want to paste answers into one
spreadsheet then look at
activity X and count how many answered Monday, Tuesday, Wednesday, Thursday,
Friday. Any suggestions on how to start would be great.

Just remeber that I'll be sending the workbook as an attachment via email to
everyone. I would like to make it's as simple as possible for them to open
answer and resend back to me. Thank you.

John
  #2   Report Post  
moondark
 
Posts: n/a
Default


Hi,

I created a Spreadsheet with the name "Start" and added 5 Optionbuttons
named "Choice1" to Choice"5" and a commandbutton to execute the code and
to vote.

The following code works but I'm not absolutely sure if it fits your
needs

Code:
--------------------
Private Sub CommandButton1_Click()
'Check if Spreadsheet "Result" exists
newone = True
For Each s In Sheets
If s.Name = "Result" Then newone = False
Next s
'if there's not such a sheet create it
If newone = True Then
Set ResultSheet = ActiveWorkbook.Worksheets.Add
ResultSheet.Name = "Result"
End If
'activate the sheet
Sheets("Result").Activate

'Fill in the values of the OptionButtons Where true = -1 and False = 0 _
so you have to subtract the value
Sheets("Result").Cells(1, 1) = Sheets("Result").Cells(1, 1) - Sheets("Start").Choice1.Value
Sheets("Result").Cells(2, 1) = Sheets("Result").Cells(2, 1) - Sheets("Start").Choice2.Value
Sheets("Result").Cells(3, 1) = Sheets("Result").Cells(3, 1) - Sheets("Start").Choice3.Value
Sheets("Result").Cells(4, 1) = Sheets("Result").Cells(4, 1) - Sheets("Start").Choice4.Value
Sheets("Result").Cells(5, 1) = Sheets("Result").Cells(5, 1) - Sheets("Start").Choice5.Value


End Sub
--------------------


it's rather simple and therefore not dynamic (,yet).
But I preferred plain code, you can learn from ;)

The code creates a Sheet called "Result" if it doesnt exist and writes
the values of the optionbuttons in Cells A1 to A5. I didnt work on
Headlines a.s.o. because everyone has his own design :)
You could also add a code fragment that checks if there is an
optionbutton selected (if not then msgbox("alert"))
something like that.


Regards,

Simon


--
moondark
------------------------------------------------------------------------
moondark's Profile: http://www.excelforum.com/member.php...o&userid=27390
View this thread: http://www.excelforum.com/showthread...hreadid=470660

Reply
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
Display form from an VB application in Excel kuhni Excel Discussion (Misc queries) 0 August 10th 05 06:04 PM
Worksheet form design rgarber50 Excel Discussion (Misc queries) 4 August 7th 05 05:09 AM
Is there a way to convert a EXCEL form into a WORD form? Carole O Excel Discussion (Misc queries) 1 April 27th 05 10:13 PM
How to compile marketing survey form result into a chart Phyllis Chin Excel Worksheet Functions 1 January 25th 05 01:58 PM
Trying to delete form border, and it deletes all borders PeterM Excel Discussion (Misc queries) 11 January 3rd 05 03:36 PM


All times are GMT +1. The time now is 10:54 PM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"