+ Reply to Thread
Results 1 to 4 of 4

Add multiple checkboxes to a userform frame acc. to found items

  1. #1
    Forum Contributor stojko89's Avatar
    Join Date
    05-18-2009
    Location
    Maribor, Slovenia
    MS-Off Ver
    MS Office 365
    Posts
    913

    Add multiple checkboxes to a userform frame acc. to found items

    Hello, me again

    I'm trying to do the following:
    Once the a found cell is approved to the IF statement, add a checkbox with the value of the cell on to a userform frame.
    Looking on, if there is another one that is approved, add a checkbox with the value of the cell under the first added checkbox.
    I've managed to do this:
    Please Login or Register  to view this content.
    This adds the first checkbox correctly, but I don't know how to carrie on, so it would add others, one under the other, as many as found on the sheet. Up to like 10max....
    Any suggestions?

    BR, Denis

  2. #2
    Forum Expert Arkadi's Avatar
    Join Date
    02-13-2014
    Location
    Smiths Falls, Ontario, Canada
    MS-Off Ver
    Office 365
    Posts
    5,059

    Re: Add multiple checkboxes to a userform frame acc. to found items

    Use a loop to add multiple ones, for example "For i = 1 to 10"

    Then change

    "Predmet1" in the code to "Predmet" & i

    Then your .Left stays the same, but .Top would equal (i-1) * 15 + 6

    the +6 means starting at a .Top of 6, the 15 you have to play with to see if the spacing is right.
    Please help by:

    Marking threads as closed once your issue is resolved. How? The Thread Tools at the top
    Any reputation (*) points appreciated. Not just by me, but by all those helping, so if you found someone's input useful, please take a second to click the * at the bottom left to let them know

    There are 10 kinds of people in this world... those who understand binary, and those who don't.

  3. #3
    Forum Expert mikerickson's Avatar
    Join Date
    03-30-2007
    Location
    Davis CA
    MS-Off Ver
    Excel 2011
    Posts
    6,229

    Re: Add multiple checkboxes to a userform frame acc. to found items

    Rather than adding checkboxes to the frame you could add items to an existing multi-select ListBox with the ListStyle fmListStyleOption.

    Please Login or Register  to view this content.
    _
    ...How to Cross-post politely...
    ..Wrap code by selecting the code and clicking the # or read this. Thank you.

  4. #4
    Forum Contributor stojko89's Avatar
    Join Date
    05-18-2009
    Location
    Maribor, Slovenia
    MS-Off Ver
    MS Office 365
    Posts
    913

    Re: Add multiple checkboxes to a userform frame acc. to found items

    Hello again,

    Sorry for the late replay. I was just working on this again.
    Thank you Arkadi for the help, but I'm going to use mikerikson's suggestion, because it simplyfies the events after.

    Thanks again to both!
    BR, Denis

+ 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. Userform with multiple checkboxes with more than 2 criterias
    By Gorbu in forum Excel Programming / VBA / Macros
    Replies: 4
    Last Post: 06-08-2016, 07:54 AM
  2. [SOLVED] Toggle between userform checkboxes for multiple pairs of checkboxes
    By L plates in forum Excel Programming / VBA / Macros
    Replies: 12
    Last Post: 04-25-2016, 06:31 AM
  3. Frame control loops its checkboxes & builds string
    By TankGirl! in forum Excel Programming / VBA / Macros
    Replies: 3
    Last Post: 03-12-2016, 02:25 PM
  4. [SOLVED] Looping through controls by frame on userform (frame within a frame)
    By njs27 in forum Excel Programming / VBA / Macros
    Replies: 3
    Last Post: 03-27-2015, 10:21 AM
  5. [SOLVED] Userform with multiple checkboxes used for autofilter
    By JorisDDS in forum Excel Programming / VBA / Macros
    Replies: 6
    Last Post: 02-21-2014, 10:41 AM
  6. VBA UserForm Multiple Pictures In Frame
    By jquintana83 in forum Excel Programming / VBA / Macros
    Replies: 0
    Last Post: 11-18-2013, 01:49 PM
  7. [SOLVED] Assessing whether any checkboxes are checked within frame
    By ExcelMonkey in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 10-16-2005, 05:05 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