+ Reply to Thread
Results 1 to 5 of 5

IF statement to enable/disable a checkbox in userform?

  1. #1
    Registered User
    Join Date
    07-10-2008
    Location
    Gold Coast, Australia
    MS-Off Ver
    2007
    Posts
    14

    IF statement to enable/disable a checkbox in userform?

    Hi,

    This seems like it would be simple enough to do but...

    I have a checkbox called optComplete that I want to be disabled UNLESS:

    1. The checkbox optoNewFF is checked, OR
    2. The checkbox optoNewClient is checked, OR
    3. An option in the combobox optqReasonNone is selected

    I've tried loads of IF statements but I keep getting errors

    Thanks in advance for your help.

  2. #2
    Forum Guru Norie's Avatar
    Join Date
    02-02-2005
    Location
    Stirling, Scotland
    MS-Off Ver
    Microsoft Office 365
    Posts
    19,643

    Re: IF statement to enable/disable a checkbox in userform?

    Try this.
    Please Login or Register  to view this content.
    If posting code please use code tags, see here.

  3. #3
    Registered User
    Join Date
    07-10-2008
    Location
    Gold Coast, Australia
    MS-Off Ver
    2007
    Posts
    14

    Re: IF statement to enable/disable a checkbox in userform?

    Thanks so much for your reply. Really appreciate your assistance.

    I thought this would need to be applied as follows, but I seem to have broken your code haha. I guess I need to also set for optComplete to be disabled when the form is intialized? Sorry for the noobness of me.

    Please Login or Register  to view this content.

  4. #4
    Forum Guru Norie's Avatar
    Join Date
    02-02-2005
    Location
    Stirling, Scotland
    MS-Off Ver
    Microsoft Office 365
    Posts
    19,643

    Re: IF statement to enable/disable a checkbox in userform?

    The only thing that might be wrong is that your combobox actually seems to be called qReasonNone, not optqReasonNone as you posted and I used in the code.

    If that's right the code should look like this.
    Please Login or Register  to view this content.

  5. #5
    Registered User
    Join Date
    07-10-2008
    Location
    Gold Coast, Australia
    MS-Off Ver
    2007
    Posts
    14

    Cool Re: IF statement to enable/disable a checkbox in userform?

    Thank you so much!! Really appreciate it.

    Couple more vba headaches to go and I am all sorted. Very impressed with the power of Excel+VBA / thought I would require an Access fix. Thanks again!!

    C.

+ 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 Listbox - Disable Selection (but enable ScrollBar)
    By jamesryan in forum Excel Programming / VBA / Macros
    Replies: 3
    Last Post: 05-26-2016, 07:18 PM
  2. [SOLVED] Enable/Disable a checkbox depending on the sheet where it resides.
    By MontySmall in forum Excel Programming / VBA / Macros
    Replies: 3
    Last Post: 05-30-2013, 10:44 PM
  3. [SOLVED] DESPERATE!!! - Enable Sub (OK Button on UserForm) if CheckBox has been Ticked
    By mkachwee in forum Excel Programming / VBA / Macros
    Replies: 3
    Last Post: 09-16-2012, 02:37 PM
  4. Enable/disable copy paste (disable part not working)
    By timtim89 in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 03-08-2012, 07:23 PM
  5. Enable and disable
    By rajeev.raj in forum Excel Programming / VBA / Macros
    Replies: 5
    Last Post: 11-10-2010, 02:50 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