+ Reply to Thread
Results 1 to 3 of 3

checkbox error msg

Hybrid View

waltron checkbox error msg 05-09-2010, 11:43 PM
pike Re: checkbox error msg 05-10-2010, 12:12 AM
waltron Re: checkbox error msg 05-10-2010, 12:30 AM
  1. #1
    Registered User
    Join Date
    07-30-2009
    Location
    melbourne, AUS
    MS-Off Ver
    Excel 2003
    Posts
    33

    checkbox error msg

    hello there

    I have 3 check boxes on a userform ckbox 1 is enabled at all times ckbox 2 & 3 become enabled when ckbox 1 is chosen (it's an option with 2 sub options), then either ckbox2 or 3 is selected but not both. I need a msgbox to appear when command button 1 is clicked if ckbox2 or 3 not both hasn't been selected whilst ckbox1 is selected. i hope this makes sense

    thanks

  2. #2
    Forum Expert pike's Avatar
    Join Date
    12-11-2005
    Location
    Alstonville, Australia
    MS-Off Ver
    2016
    Posts
    5,342

    Re: checkbox error msg

    why use option buttons in a frame so that only one can be checked?

    but for your answer
    Private Sub CheckBox2_Click()
    If CheckBox3 = True And CheckBox2 Then
    MsgBox " You have check 3"
    End If
    End Sub
    
    Private Sub CheckBox3_Click()
    If CheckBox2 = True And CheckBox3 = True Then
    MsgBox " You have check 2"
    End If
    End Sub
    If the solution helped please donate to RSPCA

    Site worth visiting: Rabbitohs

  3. #3
    Registered User
    Join Date
    07-30-2009
    Location
    melbourne, AUS
    MS-Off Ver
    Excel 2003
    Posts
    33

    Re: checkbox error msg

    thanx Pike

    your code is working

+ Reply to Thread

Thread Information

Users Browsing this Thread

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

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