Results 1 to 7 of 7
  1. #1
    Plutonium Lounger
    Join Date
    Mar 2002
    Posts
    84,353
    Thanks
    0
    Thanked 29 Times in 29 Posts

    Re: Checkbox controll.. (2000 sr 1)

    Yes. <img src=/S/grin.gif border=0 alt=grin width=15 height=15>
    .
    .
    .
    But if you want a more specific answer, please provide more information.

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

    Checkbox controll.. (2000 sr 1)

    ... assuming i have a useform with many chekbox, is possible controll via macro if one of this group of chekbox are selected?
    If one or more not are selected msgbox: Attention select one or more chekbox!"

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

    Re: Checkbox controll.. (2000 sr 1)

    Say that you have check boxes named CheckBox1 to CheckBox10. You could use code like this:

    Dim i As Integer
    Dim intCount As Integer
    ' Change the number as needed
    For i = 1 To 10
    If Me.Controls("Checkbox" & i) Then
    intCount = intCount + 1
    End If
    Next i
    If intCount = 0 Then
    MsgBox "Please tick at least one check box!", vbExclamation
    Exit Sub
    End If

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

    Re: Checkbox controll.. (2000 sr 1)

    Tks Hans...
    This is my idea: at least one

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

    Re: Checkbox controll.. (2000 sr 1)

    not work... i suspect you have think the check box are in correct sequence: 1,2,3,...ecc...
    Infact after the second controll the for next go in error... In effect i have :
    CheckBox1 CheckBox2 CheckBox5. CheckBox6.Value

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

    Re: Checkbox controll.. (2000 sr 1)

    Solved... renamed all chkbox 1 to 4 and fix the for next cicle to 4....

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

    Re: Checkbox controll.. (2000 sr 1)

    Can you rename them so that the numbers are consecutive?

Posting Permissions

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