+ Reply to Thread
Results 1 to 4 of 4

Command Button disabled until checkbox selected

  1. #1
    Forum Contributor
    Join Date
    08-04-2008
    Location
    West Calder, Scotland
    MS-Off Ver
    365
    Posts
    430

    Command Button disabled until checkbox selected

    Good Morning Folk

    I have a userform that will open when the workbook opens. It has two checkboxes and a command button. I am looking for the command button to be disabled until one of the checkboxes is selected.

    The checkboxes are working ok however the command button is enabled at all times and selecting it without selecting a checkbox throws up an error in the 'cmdenter.Enabled = False' line

    This is the code I have so far, can someone point out where I have went wrong,, many thanks

    Please Login or Register  to view this content.
    Many thanks for your help
    Last edited by JamesT1; 12-06-2013 at 05:54 AM.

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

    Re: Command Button disabled until checkbox selected

    Seems bit complicated, At the top of the Command Box Click event. Test for the option button and exit.

    Please Login or Register  to view this content.

  3. #3
    Forum Contributor
    Join Date
    08-04-2008
    Location
    West Calder, Scotland
    MS-Off Ver
    365
    Posts
    430

    Re: Command Button disabled until checkbox selected

    mehmetcik

    Many thanks for the advice,, it now works... I removed the other code and adjusted the code for the command button to include the two lines for the check boxes....

    much simpler now...

    Please Login or Register  to view this content.

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

    Re: Command Button disabled until checkbox selected

    You have one if statement too many


    Please Login or Register  to view this content.

+ 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. [SOLVED] Command button grayed out till option button selected
    By Jeff121 in forum Excel Programming / VBA / Macros
    Replies: 3
    Last Post: 07-25-2013, 11:00 AM
  2. clearing a checkbox wth command button
    By shakey775 in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 01-17-2012, 05:37 PM
  3. Command Button to clear checkbox
    By zplugger in forum Excel General
    Replies: 2
    Last Post: 06-26-2011, 09:36 AM
  4. Checkbox choices that run code on clicking command button
    By Sharky in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 02-08-2007, 05:30 PM
  5. deleting a row with checkbox and command button
    By student123 in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 01-06-2005, 02:19 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