+ Reply to Thread
Results 1 to 4 of 4

DESPERATE!!! - Enable Sub (OK Button on UserForm) if CheckBox has been Ticked

  1. #1
    Registered User
    Join Date
    09-15-2012
    Location
    South Africa
    MS-Off Ver
    Excel 2016
    Posts
    33

    DESPERATE!!! - Enable Sub (OK Button on UserForm) if CheckBox has been Ticked

    Hi there urgent request friends

    How does one enable a command button Sub if and only if the tick box has been checked on a user form???
    I've got the following but it seems to accept info even if the check box is not checked.

    Private Sub chkbxVerify_Click()
    If chkbxVerify.Value = True Then cmdAddItem.Enabled
    If chkbxVerify.Value = False Then MsgBox ("Please check the verification box", vbOKCancel, "Checkbox Verification Error")
    End Sub

    Thanks in advance!!!!

  2. #2
    Forum Guru HaHoBe's Avatar
    Join Date
    02-19-2005
    Location
    Hamburg, Germany
    MS-Off Ver
    work: 2016 on Win10 (notebook), private: 2019 on Win10 (desktop), 2019 on Win11 (notebook)
    Posts
    8,197

    Re: DESPERATE!!! - Enable Sub (OK Button on UserForm) if CheckBox has been Ticked

    Hi, mkachwee,

    Please Login or Register  to view this content.
    Please Login or Register  to view this content.
    Ciao,
    Holger
    Use Code-Tags for showing your code: [code] Your Code here [/code]
    Please mark your question Solved if there has been offered a solution that works fine for you

  3. #3
    Registered User
    Join Date
    09-15-2012
    Location
    South Africa
    MS-Off Ver
    Excel 2016
    Posts
    33

    Re: DESPERATE!!! - Enable Sub (OK Button on UserForm) if CheckBox has been Ticked

    Thanks works perfectly!!!

  4. #4
    Forum Expert Cutter's Avatar
    Join Date
    05-24-2004
    Location
    Ontario,Canada
    MS-Off Ver
    Excel 2010
    Posts
    6,451

    Re: DESPERATE!!! - Enable Sub (OK Button on UserForm) if CheckBox has been Ticked

    @ mkachwee

    Welcome to the forum.

    Based on your last post it seems that you are satisfied with the solution(s) you've received but you haven't marked your thread as SOLVED. I'll do that for you now but please keep in mind for your future threads that Rule #9 requires you to do that yourself. If your problem has not been solved you can use Thread Tools (located above your first post) and choose "Mark this thread as unsolved".
    Thanks.

    Also, as a new member of the forum, you may not be aware that you can thank those who have helped you by clicking the small star icon located in the lower left corner of the post in which the help was given. By doing so you can add to the reputation(s) of those who helped.

+ Reply to Thread

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

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