Results 1 to 6 of 6
  1. #1
    Gold Lounger
    Join Date
    Jan 2004
    Location
    Italy
    Posts
    3,245
    Thanks
    0
    Thanked 0 Times in 0 Posts

    3 chkbox particular... (2000 sr 1)

    i have a userform with 3 chkbox (1,2, and3)...
    My problem is:
    If i select one of this other two must be disable or loked or other solution....
    if i select chkbox1, the chbox2 and chkbox3 must be disadled or loked....
    if i select chkbox2, the chbox1 and chkbox3 must be disadled or loked....
    ecc....
    in effect permit only one choice from the tree chkbox disponible.

    Tks

  2. #2
    Plutonium Lounger
    Join Date
    Mar 2002
    Posts
    84,353
    Thanks
    0
    Thanked 29 Times in 29 Posts

    Re: 3 chkbox particular... (2000 sr 1)

    Instead of check boxes, use option buttons and give them the same GroupName property. Within a group of option buttons, only one can be "on" - the others will automatically be turned "off".

  3. #3
    Gold Lounger
    Join Date
    Jan 2004
    Location
    Italy
    Posts
    3,245
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: 3 chkbox particular... (2000 sr 1)

    good idea! work for me...
    Tks

  4. #4
    Gold Lounger
    Join Date
    Jan 2004
    Location
    Italy
    Posts
    3,245
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: 3 chkbox particular... (2000 sr 1)

    Sorry Hans why not work this group of line?
    In effect show msg box if not one optionbutton is selected...

    If Me.OptionButton1 = False Or Me.OptionButton2 = False Or Me.OptionButton3 = False Then
    MsgBox "SELEZIONARE UNA TIPOLOGIA DI DOCUMENTAZIONE", vbCritical
    Exit Sub
    End If

  5. #5
    Plutonium Lounger
    Join Date
    Mar 2002
    Posts
    84,353
    Thanks
    0
    Thanked 29 Times in 29 Posts

    Re: 3 chkbox particular... (2000 sr 1)

    You should use And instead of Or, since you only want to display the message box if all three option buttons are off.

    Alternatively, you can set the Value property of one of the option buttons to True in design view (in the Visual Basic Editor). When the userform is displayed, one of the option buttons will be on.

  6. #6
    Gold Lounger
    Join Date
    Jan 2004
    Location
    Italy
    Posts
    3,245
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: 3 chkbox particular... (2000 sr 1)

    And instead of Or... i am stupid!
    Tks.
    And tks for suggestion on "...Alternatively, you can set the Value property of one of the option buttons to True in design view (in the Visual Basic Editor). ", i use this

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •