+ Reply to Thread
Results 1 to 3 of 3

Checkboxes in userform VBA

  1. #1
    Registered User
    Join Date
    10-23-2007
    Posts
    80

    Checkboxes in userform VBA

    Hello,

    I have a userform that contains 16 checkboxes. The user will be able to tick as many of these checkboxes as they need, before clicking on the "OK" button (CommandButton5). Everything else is all set up and ready to go, all I need is the code to...

    - When the user selects CommandButton5 (OK) it needs to run other macros depending on which checkboxes are ticked. For example, call 'macro1' if checkbox1 is ticked, call 'macro2' if checkbox2 is ticked... and so on (all the way up to checkbox16).
    - Run macro20 if the user clicks on OK without having ticked any of the checkboxes.

    Hope this makes sense!

    Many thanks for your help!
    Last edited by lealea1982; 08-27-2013 at 05:31 AM.

  2. #2
    Forum Expert Solus Rankin's Avatar
    Join Date
    05-24-2013
    Location
    Hollywood, CA
    MS-Off Ver
    Win7 Office 2010 VS Express 2012
    Posts
    2,655

    Re: Checkboxes in userform VBA

    Please Login or Register  to view this content.
    With this method if the Checkbox's name is CheckBox1 it should run Macro1 and so on.
    Last edited by Solus Rankin; 08-23-2013 at 02:14 PM.
    Thanks,
    Solus


    Please remember the following:

    1. Use [code] code tags [/code]. It keeps posts clean, easy-to-read, and maintains VBA formatting.
    Highlight the code in your post and press the # button in the toolbar.
    2. Show appreciation to those who have helped you by clicking below their posts.
    3. If you are happy with a solution to your problem, mark the thread as [SOLVED] using the tools at the top.

    "Slow is smooth, smooth is fast."

  3. #3
    Registered User
    Join Date
    10-23-2007
    Posts
    80

    Re: Checkboxes in userform VBA

    Sorted! Thank you!

+ 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. Print Sheets based on checkboxes in UserForm, Checkboxes also control another macro
    By krackaberr in forum Excel Programming / VBA / Macros
    Replies: 34
    Last Post: 03-05-2013, 11:12 AM
  2. Userform checkboxes
    By MichelleW in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 09-02-2011, 03:53 PM
  3. Checkboxes in Userform
    By ABSTRAKTUS in forum Excel Programming / VBA / Macros
    Replies: 4
    Last Post: 12-15-2010, 04:13 PM
  4. Userform Checkboxes
    By gti_jobert in forum Excel General
    Replies: 1
    Last Post: 01-27-2006, 09:25 AM
  5. Userform with Checkboxes
    By Greg B in forum Excel General
    Replies: 5
    Last Post: 11-27-2005, 05:35 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