stefano
Gebruiker
- Lid geworden
- 22 mei 2004
- Berichten
- 865
Beste,
Ik heb een form gemaakt met onderstaande code. Ik vermoed dat ik dit beter kan laten 'loopen'. De vraag is natuurlijk hoe?
Ik heb een form gemaakt met onderstaande code. Ik vermoed dat ik dit beter kan laten 'loopen'. De vraag is natuurlijk hoe?
Code:
Private Sub CommandButton1_Click()
If CheckBox1.Value = True Then Cells(28, 3).Value = CheckBox1.Caption
If CheckBox2.Value = True Then Cells(28, 3).Value = CheckBox2.Caption
If CheckBox3.Value = True Then Cells(28, 3).Value = CheckBox3.Caption
If CheckBox4.Value = True Then Cells(28, 3).Value = CheckBox4.Caption
If CheckBox5.Value = True Then Cells(28, 3).Value = CheckBox5.Caption
If CheckBox6.Value = True Then Cells(28, 3).Value = CheckBox6.Caption
End Sub
Code:
Private Sub CommandButton1_Click()
for j = 1 to 6
[COLOR="#FF0000"]If CheckBox1.Value = True Then Cells(28, 3).Value = CheckBox1.Caption[/COLOR]
next j
End Sub