+ Reply to Thread
Results 1 to 4 of 4

Using ToggleButtons to answer questions.

  1. #1
    Forum Contributor
    Join Date
    06-25-2012
    Location
    U.K
    MS-Off Ver
    Excel 2016
    Posts
    101

    Using ToggleButtons to answer questions.

    Hi,
    I need the ability to select answers to multiple questions on a UserForm and then transfer the answers to a table.

    Example

    Q1 Are apples green. Yes/No
    Q2 Is the sky blue. Yes/No
    Q3 Can frogs jump. Yes/No/Maybe

    An so on.

    I was trying to use ToggleButtons. One for Yes, one for no and one for other for each question but had to right code for each combination of possible answers.

    As you can see from the below code. And this is with just two questions.



    Please Login or Register  to view this content.
    Is there a more tidy way to achieve this. Ideally i would like to keep the ToggleButtons as i can have them any size.

    Also i'd like to avoid being able to select more the one answer to each question.
    Attached Files Attached Files

  2. #2
    Forum Expert
    Join Date
    12-14-2012
    Location
    London England
    MS-Off Ver
    MS 365 Office Suite.
    Posts
    8,448

    Re: Using ToggleButtons to answer questions.

    Hi

    You are making all the classic mistakes.

    Firstly. You need to number all your controls by the column that its data is in.

    So Textbox9 and Command Buttons 10 to 13.

    I will rebuild this for you if you can wait 10 minutes


    Please Login or Register  to view this content.
    Attached Files Attached Files
    Last edited by mehmetcik; 11-08-2018 at 06:38 PM.
    My General Rules if you want my help. Not aimed at any person in particular:

    1. Please Make Requests not demands, none of us get paid here.

    2. Check back on your post regularly. I will not return to a post after 4 days.
    If it is not important to you then it definitely is not important to me.

  3. #3
    Forum Contributor
    Join Date
    06-25-2012
    Location
    U.K
    MS-Off Ver
    Excel 2016
    Posts
    101

    Re: Using ToggleButtons to answer questions.

    Thanks for the help,

    Sorry i should have pointed out that this is a small part of a much larger project. The table is just part of a larger table, half shows that a job has been raised the other half (that i have included in this post) includes the data when the job has been completed. I need to retain the ability for the user to select a started job from the table and update what they did. So looking for the next blank row will not work.

  4. #4
    Forum Expert
    Join Date
    12-14-2012
    Location
    London England
    MS-Off Ver
    MS 365 Office Suite.
    Posts
    8,448

    Re: Using ToggleButtons to answer questions.

    It will still work.

    If you are reading an existing Entry then use a variable to store the Entry Row Number.

    Then when you save

    Use a Line like

    Please Login or Register  to view this content.
    Then store your data using:-

    Please Login or Register  to view this content.

    So if you have a Button that says " Create New Entry " then the code for that is

    Please Login or Register  to view this content.
    Last edited by mehmetcik; 11-08-2018 at 07:35 PM.

+ 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. Thanks for the add, searching for previous answer posts, pre-questions.
    By Skillhoarder826 in forum Hello..Introduce yourself
    Replies: 1
    Last Post: 12-22-2016, 11:42 PM
  2. Replies: 4
    Last Post: 04-12-2016, 03:50 PM
  3. [SOLVED] ToggleButtons , lots of togglebuttons.. need to shorten the vba code
    By Aurbo in forum Excel Programming / VBA / Macros
    Replies: 11
    Last Post: 08-25-2015, 12:19 PM
  4. Excel 2010: How do i answer these questions with SUMIF/VLOOKUP?
    By at13 in forum Excel Formulas & Functions
    Replies: 22
    Last Post: 11-07-2013, 01:32 PM
  5. Replies: 7
    Last Post: 07-13-2013, 12:46 PM
  6. VBA code for Questions Answer
    By amitjn in forum Excel General
    Replies: 4
    Last Post: 05-23-2010, 02:52 PM
  7. two unaswered questions, Could you answer me one or the two of the
    By filo666 in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 10-19-2005, 10:05 AM

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