+ Reply to Thread
Results 1 to 6 of 6

Saving Survey results with Radio Button

  1. #1
    Registered User
    Join Date
    06-12-2013
    Location
    Canada
    MS-Off Ver
    Excel 2016
    Posts
    35

    Saving Survey results with Radio Button

    So I have followed this:
    https://www.youtube.com/watch?v=MZx79FdKveY
    and this:
    https://www.youtube.com/watch?v=d3BIu4GrWcM

    What is the VBA script to save the selection in the multiple choice options? See my attached Excel sheet.

    Thanks for your help.

    Too bad I couldn't find this on YouTube.
    Attached Files Attached Files

  2. #2
    Forum Expert
    Join Date
    12-10-2006
    Location
    Sydney
    MS-Off Ver
    Office 365
    Posts
    3,525

    Re: Saving Survey results with Radio Button

    Hi there,

    In the following I have split the question number and result into two variables so can do with them as you please (I have just put them in a message box):

    Please Login or Register  to view this content.
    Too bad I couldn't find this on YouTube.
    Thank goodness for forum's like this then

    Regards,

    Robert
    ____________________________________________
    Please ensure you mark your thread as Solved once it is. Click here to see how
    If this post helps, please don't forget to say thanks by clicking the star icon in the bottom left-hand corner of my post

  3. #3
    Registered User
    Join Date
    06-12-2013
    Location
    Canada
    MS-Off Ver
    Excel 2016
    Posts
    35

    Re: Saving Survey results with Radio Button

    Hi Trebor, how do I linke the button to the script? Sorry I'm new with VBA.

    In Dim btnMyButton As OptionButton
    is btnmyButton the name of my nutton?

    But button is called CommandButton2

    Private Sub CommandButton2_Click()

    End Sub

  4. #4
    Forum Expert
    Join Date
    12-10-2006
    Location
    Sydney
    MS-Off Ver
    Office 365
    Posts
    3,525

    Re: Saving Survey results with Radio Button

    Refer attached where I've linked my macro the the Submit button (the type of which I also changed from an ActiveX control to a form control). When you click that button the code loops through all the buttons and alerts you if a button has been selected (I do this via a variable called btnMyButton).
    Attached Files Attached Files

  5. #5
    Registered User
    Join Date
    06-12-2013
    Location
    Canada
    MS-Off Ver
    Excel 2016
    Posts
    35

    Re: Saving Survey results with Radio Button

    Instead of the box prompt "The value for question 1 is 1" how could I add all the results and divide them by the number of questions. Then save it into another tab?

    Suppose I want to add a comment box such as:

    "Please rate your comments:"

    How would be able to save the results in another tab?

    Thank you,

  6. #6
    Forum Expert
    Join Date
    12-10-2006
    Location
    Sydney
    MS-Off Ver
    Office 365
    Posts
    3,525

    Re: Saving Survey results with Radio Button

    Have a look at the attached where the number of selections (i.e. radio buttons selected) are divided by the question value in Sheet1. This assumes only one radio button per question can be made and that a selection of N/A equals a zero value.
    Attached Files Attached Files

+ Reply to Thread

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Similar Threads

  1. Replies: 0
    Last Post: 06-10-2014, 10:44 PM
  2. Linking a VBA Form Radio Button to a Option Button
    By buwa84 in forum Excel Programming / VBA / Macros
    Replies: 3
    Last Post: 06-05-2014, 01:46 PM
  3. Replies: 3
    Last Post: 08-28-2013, 05:39 AM
  4. Excel survey using groups of radio buttons side by side
    By SnoterB in forum Excel Programming / VBA / Macros
    Replies: 0
    Last Post: 05-17-2013, 06:37 PM
  5. Collecting survey data from radio buttons
    By bobfor1 in forum Excel Programming / VBA / Macros
    Replies: 0
    Last Post: 09-26-2012, 10:50 PM
  6. Creating a Survey-Style Form Using Radio Buttons in Cells
    By antiSocialWorker in forum Excel General
    Replies: 1
    Last Post: 04-20-2012, 03:52 PM
  7. Pressing one radio button to select another radio button
    By raehippychick in forum Excel General
    Replies: 1
    Last Post: 09-13-2007, 11:30 PM

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts

Search Engine Friendly URLs by vBSEO 3.6.0 RC 1