• DİKKAT

    DOSYA İndirmek/Yüklemek için ÜCRETLİ ALTIN ÜYELİK Gereklidir!
    Altın Üyelik Hakkında Bilgi

Option Button

Katılım
8 Kasım 2011
Mesajlar
16
Excel Vers. ve Dili
excel 2007 türkçe
Merhaba
benim şöyle bir sorum olacak.
2 tane option button var. Örneğin 1. sini seçtiğimde kadına ait verilerin combobox ta, 2. yi seçtiğimde ise erkeğe ait verilerin combobox ta görüntülenmesini istiyorum. Yardımcı olabilir misiniz?
İyi akşamlar
 
Merhaba
benim şöyle bir sorum olacak.
2 tane option button var. Örneğin 1. sini seçtiğimde kadına ait verilerin combobox ta, 2. yi seçtiğimde ise erkeğe ait verilerin combobox ta görüntülenmesini istiyorum. Yardımcı olabilir misiniz?
İyi akşamlar
Oluruz.:cool:
 
veri alanlarını isimlendirdim. Combobox a ;
If OptionButton1= True Then
Combobox1.Show= bayan
ElseIf OptionButton2= True Then
Combobox1.Show= erkek
yazıyorum fakat olmuyo. Nerde hata yapıyorum acaba ?
 
Bayan için şöyle deneyin.:cool:
Kod:
Combobox1.rowsource= "bayan"
 
Dediğiniz gibi yapıyorum fakat olmuyor, option button a da kod yazmam mı gerekiyor ?
 
Bir tane örnek dosya yollayınız.Onda göstereyim.
option button da örneğin bayan ı seçtiğimde combobox ta bayantercih alanı olarak isimlendirilen verilerin gözükmesini istiyorum. Aynı şey erkek için de geçerli
 

Ekli dosyalar

option button da örneğin bayan ı seçtiğimde combobox ta bayantercih alanı olarak isimlendirilen verilerin gözükmesini istiyorum. Aynı şey erkek için de geçerli

Dosyanız ektedir.:cool:
Kod:
Private Sub OptionButton1_Click()
Dim sat As Long, i As Long
sat = Cells(Rows.Count, "B").End(xlUp).Row
ComboBox1.Clear
For i = 1 To sat
    If Cells(i, "D").Value = "B" Then ComboBox1.AddItem Cells(i, "B").Value
Next i
End Sub

Private Sub OptionButton2_Click()
Dim sat As Long, i As Long
sat = Cells(Rows.Count, "B").End(xlUp).Row
ComboBox1.Clear
For i = 1 To sat
    If Cells(i, "D").Value = "E" Then ComboBox1.AddItem Cells(i, "B").Value
Next i
End Sub
 

Ekli dosyalar

Dosyanız ektedir.:cool:
Kod:
Private Sub OptionButton1_Click()
Dim sat As Long, i As Long
sat = Cells(Rows.Count, "B").End(xlUp).Row
ComboBox1.Clear
For i = 1 To sat
    If Cells(i, "D").Value = "B" Then ComboBox1.AddItem Cells(i, "B").Value
Next i
End Sub

Private Sub OptionButton2_Click()
Dim sat As Long, i As Long
sat = Cells(Rows.Count, "B").End(xlUp).Row
ComboBox1.Clear
For i = 1 To sat
    If Cells(i, "D").Value = "E" Then ComboBox1.AddItem Cells(i, "B").Value
Next i
End Sub

çok sağolun teşekkürler
 
if OptionButton1 = True then
ComboBox1="erkek"
ElseIf OptionButton2= true then
ComboBox1= "Kadın"
end if
 
if optionbutton1=true then
combobox1="erkek"
elseif optionbutton2=true then
combobox1="kadın"
end if
 
Geri
Üst