Code verkürzen?
30.10.2003 12:58:12
Richter
ich möchte auf einer Form folgendes überprüfen, ob Checkboxen angeklickt wurden sind. Wenn keine einzige angeklickt wurden ist soll eine Fehlermeldung ausgegeben werden. Habe mir schon was zusammengeschrieben das auch funktioniert.
Aber geht des ned auch kürzer? Zum Beispiel das man irgendwie schreiben könnte von Checkbox1 bis Checkbox sowieso!!
Vielen Dank im voraus, gruß Daniel
If menu.CheckBox1.Value = False And _
menu.CheckBox2.Value = False And _
menu.CheckBox3.Value = False And _
menu.CheckBox4.Value = False And _
menu.CheckBox5.Value = False And _
menu.CheckBox6.Value = False And _
menu.CheckBox7.Value = False And _
menu.CheckBox8.Value = False And _
menu.CheckBox9.Value = False And _
menu.CheckBox10.Value = False And _
menu.CheckBox11.Value = False And _
menu.CheckBox12.Value = False And _
menu.CheckBox13.Value = False And _
menu.CheckBox14.Value = False And _
menu.CheckBox15.Value = False And _
menu.CheckBox16.Value = False And _
menu.CheckBox17.Value = False And _
menu.CheckBox18.Value = False Then .....