Checkboxta döngü problemi

Korhan Ayhan

Administrator
Yönetici
Admin
Katılım
15 Mart 2005
Mesajlar
42,245
Excel Vers. ve Dili
Microsoft 365 Tr-En 64 Bit
Selamlar,

Arkadaşlar aşağıdaki döngüye Checkboxların enabled özelliği false olanları atla diye bir ifade eklemek istiyorum. Yada döngüyü form üzerinde sadece enabled özelliği true olanların value değerini true yap diye nasıl değiştirebilirim.

Private Sub CheckBox7_Click()
If CheckBox7.Value = True Then
For X = 1 To 6
Controls("CheckBox" & X).Enabled = False
Controls("CheckBox" & X).Value = True
CommandButton1.Enabled = True
Next
End If
If CheckBox7.Value = False Then
For X = 1 To 6
Controls("CheckBox" & X).Enabled = True
Controls("CheckBox" & X).Value = False
CommandButton1.Enabled = False
Next
End If
End Sub
 
Katılım
29 Eylül 2004
Mesajlar
1,810
Excel Vers. ve Dili
Excel 2002 TR
soruyu tam anlamamış olabilirim ama bu şekildemi?

Private Sub CheckBox7_Click()
If CheckBox7.Value = True Then
For X = 1 To 6
If Controls("CheckBox" & X).Enabled = True Then Controls("CheckBox" & X).Value = True
CommandButton1.Enabled = True
Next
End If
If CheckBox7.Value = False Then
For X = 1 To 6
If Controls("CheckBox" & X).Enabled = True Then Controls("CheckBox" & X).Value = False
CommandButton1.Enabled = False
Next
End If
End Sub
 

Korhan Ayhan

Administrator
Yönetici
Admin
Katılım
15 Mart 2005
Mesajlar
42,245
Excel Vers. ve Dili
Microsoft 365 Tr-En 64 Bit
Teşekkür ederim. :arkadas:
 
Üst