+ Reply to Thread
Results 1 to 7 of 7

Checkboxes to create lists

  1. #1
    Registered User
    Join Date
    02-13-2014
    Location
    London, England
    MS-Off Ver
    Excel 2013
    Posts
    4

    Checkboxes to create lists

    Hi All,

    Can anyone suggest a way to create a list in a cell which is generated by checking checkboxes in a userform. Something along the line of (not in syntax!):

    for cell b3 - if checkbox 1 == true - inset "word1", if checkbox 2 == true - inset "word2" etc.

    Essentially what I'm after is to have 10 checkboxes to create a list of the checked items in a cell on pressing the submit button.

    thanks for any help!!

  2. #2
    Forum Expert MickG's Avatar
    Join Date
    11-23-2007
    Location
    Banbury,Oxfordshire
    Posts
    2,650

    Re: Checkboxes to create lists

    Place this code in a command button on your userform.
    Results in column "A"
    Please Login or Register  to view this content.

  3. #3
    Registered User
    Join Date
    02-13-2014
    Location
    London, England
    MS-Off Ver
    Excel 2013
    Posts
    4

    Re: Checkboxes to create lists

    Hi Mick,

    thanks for your response, but the debugger is finding a problem with line 6 of your code (not sure what to amend in relation to my sheet) and I think this is going to be easier with a multi-select list box on second thought.

    However,

    not sure how to get the selected options to output into a cell. I'm trying the code in the submit button sub which is working for all combo boxes and text fields but simply doesn't output the results of the list box for some reason:

    We're looking at row 16 (listbox1)

    Please Login or Register  to view this content.
    any thoughts?

  4. #4
    Forum Expert MickG's Avatar
    Join Date
    11-23-2007
    Location
    Banbury,Oxfordshire
    Posts
    2,650

    Re: Checkboxes to create lists

    You need to set your listbox to "Multiselect", and using code basically as below, place the selected items on the sheet.
    Please Login or Register  to view this content.

  5. #5
    Registered User
    Join Date
    02-13-2014
    Location
    London, England
    MS-Off Ver
    Excel 2013
    Posts
    4

    Re: Checkboxes to create lists

    Hi Mick,

    not 100% on what would need to be edited in your code to refer to my data, I've guessed and swapped a few things out but returns an error each time.

    Below is the full UserForm code so that you can see what I'm working with and trying to achieve.

    Please Login or Register  to view this content.

  6. #6
    Registered User
    Join Date
    02-13-2014
    Location
    London, England
    MS-Off Ver
    Excel 2013
    Posts
    4

    Re: Checkboxes to create lists

    Don't worry Mike, I've sussed it :D Thanks very much for your input anyway!

    Please Login or Register  to view this content.

  7. #7
    Forum Expert MickG's Avatar
    Join Date
    11-23-2007
    Location
    Banbury,Oxfordshire
    Posts
    2,650

    Re: Checkboxes to create lists

    Good news !!!
    Regrds Mick

+ 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: 1
    Last Post: 06-14-2013, 04:06 PM
  2. [SOLVED] Multiple Checkboxes to Create a List
    By robstark in forum Excel General
    Replies: 4
    Last Post: 07-25-2012, 03:33 PM
  3. Create search form with checkboxes
    By Dan K in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 06-21-2012, 09:13 AM
  4. Automatically create checkboxes?
    By devon1215 in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 09-12-2011, 01:01 PM
  5. Create listbox w/ checkboxes in VBA?
    By ahartman in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 03-10-2010, 05:28 AM

Tags for this Thread

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