• DİKKAT

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

Combobox da seçip Listbox da gösterme

Ahmet ÖZGÜR

Altın Üye
Katılım
8 Haziran 2010
Mesajlar
349
Excel Vers. ve Dili
Office 2003 TR Office 2007 Office 2010
Selamün Aleyküm.

Bir uzerform oluşturdum.

Rapor isimli Userform üzerinde Combobox2 Rapor sayfasındaki a10;a23 arasında liste görünümündeyken hangi ayı seçersem , Listbox da b10;k23 satırlarında seçilen ayın yanındaki satırları göstermeli.

Örnek çok ama uyarlıyamıyorum Tabloma.
 
Son düzenleme:
Bu kadar zorlayıcı bir iş olduğunu tahmin etmemiştim. :)
 
Merhaba Vardar07,
ek için teşekkür ederim birazdan bakacağım dosyaya.
Lakin ben dosyanın karışık olduğu kanatindeyim degilim.

iyi günler
 
Vardar07 Teşekkür ederim güzel çalışma ellerinize sağlık.

Sayılarda ondalık ayırma işlemini yapmıyor, nasıl yaptırabilirim.

Kod:
Private Sub ComboBox1_Change()
If ComboBox1.ListIndex < 0 Then Exit Sub
a = ComboBox1.ListIndex + 10
b = 2
c = 2
For i = 1 To 10
Controls("TextBox" & i).Value = Sheets("Rapor").Cells(a, b)
b = b + 1
Next i
For i = 44 To 47
Controls("TextBox" & i).Value = Sheets("Rapor").Cells(a + 19, c)
c = c + 1
Next i
Label38.Caption = ComboBox1.Text & " AYI ÜTÜ VE KALİTE KONTROL  ADET TOPLAMI"
Label66.Caption = ComboBox1.Text & " AYI ÜTÜ VE PAKET SEVKİYAT TOPLAMI"
End Sub



Private Sub UserForm_Initialize()
ComboBox1.Clear
For i = 10 To 23
ComboBox1.AddItem Worksheets("RAPOR").Cells(i, "A").Value
Next i
ComboBox1.Text = "Ay Seçiniz"
a = 2
For k = 6 To 15
Controls("Label" & k).Caption = Sheets("Rapor").Cells(9, a)
Next k
 
Son düzenleme:
Merhaba,

Vardar07 nin kodlarınızdan esinlenerek aşağısına da ben bir combobox ekledim.

Bu arada ondalık ayırımını hala bulamadım yardimci olurmusunuz
 
Son düzenleme:
Dosyanız ektedir.:cool:
Kod:
Controls("TextBox" & i).Value = Format(Sheets("Rapor").Cells(a + 19, c), "#,##0.00")
 
Allah razı olsun.

Ekteki excel de veri dogrulama yaptım tarih göstermekte bu veri doğrulamasını userformda combobox da gösterebilirmiyim. Comboboxda tarih değiştirince excel hücresindekide değişsin mümkünmüdür.
 
Allah razı olsun.

Ekteki excel de veri dogrulama yaptım tarih göstermekte bu veri doğrulamasını userformda combobox da gösterebilirmiyim. Comboboxda tarih değiştirince excel hücresindekide değişsin mümkünmüdür.

Hangi ekteki dosyada?
 
Allah razı olsun.

Ekteki excel de veri dogrulama yaptım tarih göstermekte bu veri doğrulamasını userformda combobox da gösterebilirmiyim. Comboboxda tarih değiştirince excel hücresindekide değişsin mümkünmüdür.

Dosyanız ektedir.:cool:
Kod:
Private Sub ComboBox3_Change()
ComboBox1.Text = "Tarih Seçiniz"
On Error Resume Next
ComboBox3.Value = Format(ComboBox3.Value, "dd.mm.yyyy")
Sheets("RAPOR").Range("A2").Value = CDate(ComboBox3.Value)
TextBox34.Value = Sheets("Rapor").Range("B5").Value
TextBox34 = Format(TextBox34, "#,0")
TextBox35.Value = Sheets("Rapor").Range("C5").Value
TextBox35 = Format(TextBox35, "#,0")
TextBox36.Value = Sheets("Rapor").Range("D5").Value
TextBox36 = Format(TextBox36, "#,0")
TextBox37.Value = Sheets("Rapor").Range("E5").Value
TextBox37 = Format(TextBox37, "#,0")
TextBox38.Value = Sheets("Rapor").Range("F5").Value
TextBox38 = Format(TextBox38, "#,0")
TextBox39.Value = Sheets("Rapor").Range("G5").Value
TextBox39 = Format(TextBox39, "#,0")
TextBox40.Value = Sheets("Rapor").Range("H5").Value
TextBox40 = Format(TextBox40, "#,0")
TextBox41.Value = Sheets("Rapor").Range("I5").Value
TextBox41 = Format(TextBox41, "#,0")
TextBox42.Value = Sheets("Rapor").Range("J5").Value
TextBox42 = Format(TextBox42, "#,0")
TextBox43.Value = Sheets("Rapor").Range("K5").Value
TextBox43 = Format(TextBox43, "#,0")
End Sub
 
Merhaba,

Hücredeki Veri Doğrulamayı Userforma Combobox3 olarak taşımışsınız comboboxtan tarih değişince hücreden de değişiyor güzel çalışmakta teşekkürler

ama hücrede devam eden satırlardaki sayılarda değişiyor userformda tarih değişince değişen hücredeki verileri userforma gelmiyor. oysa ben o textbox lara o hucrelerdeki verileri aldırıyorum. Userformu kapatıp açınca veriler geliyor.
 
Son düzenleme:
Merhaba.
Belgeyi ve form'u pek incelemedim.
Yanlış anlamadıysam ComboBox3_Change kodlarında End Sub satırından önce aşağıdaki satırı ekleyerek dener misiniz?
Kod:
Call UserForm_Initialize
 
Merhaba,

Hücredeki Veri Doğrulamayı Userforma Combobox3 olarak taşımışsınız comboboxtan tarih değişince hücreden de değişiyor güzel çalışmakta teşekkürler

ama hücrede devam eden satırlardaki sayılarda değişiyor userformda tarih değişince değişen hücredeki verileri userforma gelmiyor. oysa ben o textbox lara o hucrelerdeki verileri aldırıyorum. Userformu kapatıp açınca veriler geliyor.

14 nolu mesajda dosyayı güncelledim.
Oradan indirebilirsiniz.:cool:
 
Tesekkurler ustadlar is yerine gecince kontrol edecegim
 
Orion1,

Elinize sağlık düşündüğümde de iyi oldu rapor sayfası.

Teşekkür Ederim
 
Userform daki kodların yedeğini alın ve aşağıdaki ile değiştirip deneyin. Ömer Beyin dediği şekilde olur ancak her defasında diğer olaylarıda güncelleyeceği için pek kullanışlı sayılmaz.

Kod:
Private Sub ComboBox1_Change()
If ComboBox1.ListIndex < 0 Then Exit Sub
a = ComboBox1.ListIndex + 10
b = 2
c = 2
For i = 1 To 10
Controls("TextBox" & i).Value = Format(Sheets("Rapor").Cells(a, b), "#,0")
b = b + 1
Next i
For i = 44 To 47
Controls("TextBox" & i).Value = Format(Sheets("Rapor").Cells(a + 19, c), "#,0")
c = c + 1
Next i
Label38.Caption = ComboBox1.Text & " AYI ÜTÜ VE KALİTE KONTROL  ADET TOPLAMI"
Label66.Caption = ComboBox1.Text & " AYI ÜTÜ VE PAKET SEVKİYAT TOPLAMI"
End Sub

Private Sub ComboBox3_Change()
ComboBox1.Text = "Tarih Seçiniz"
On Error Resume Next
ComboBox3.Value = Format(ComboBox3.Value, "dd.mm.yyyy")
Sheets("RAPOR").Range("A2").Value = CDate(ComboBox3.Value)
Call yenile
End Sub

Private Sub ComboBox2_Change()
If ComboBox2.ListIndex < 0 Then Exit Sub
a = ComboBox2.ListIndex + 46
b = 2
c = 2
For i = 48 To 56
Controls("TextBox" & i).Value = Format(Sheets("Rapor").Cells(a, b), "#,0")
b = b + 1
Next i
Label110.Caption = ComboBox2.Text & " HAFTA ÜTÜ VE KALİTE KONTROL ADET TOPLAMI"
End Sub

Private Sub UserForm_Initialize()
ComboBox1.Clear
For i = 10 To 23
ComboBox1.AddItem Worksheets("RAPOR").Cells(i, "A").Value
Next i
ComboBox1.Text = "Ay Seçiniz"
a = 2
For k = 6 To 15
Controls("Label" & k).Caption = Sheets("Rapor").Cells(9, a)
ComboBox2.Clear
For i = 46 To 56
ComboBox2.AddItem Worksheets("RAPOR").Cells(i, "A").Value
Next i
ComboBox2.Text = "Hafta Seçiniz"
a = 2
For i = 48 To 56
Next i
Next k
TextBox11.Value = Format(Sheets("Rapor").Range("A1").Value, "dd.mm.yyyy")
TextBox12.Value = Sheets("Rapor").Range("M4").Value
TextBox12 = Format(TextBox12, "#,0")
TextBox13.Value = Sheets("Rapor").Range("L4").Value
TextBox13 = Format(TextBox13, "#,0")
TextBox14.Value = Sheets("Rapor").Range("B4").Value
TextBox14 = Format(TextBox14, "#,0")
TextBox15.Value = Sheets("Rapor").Range("C4").Value
TextBox15 = Format(TextBox15, "#,0")
TextBox16.Value = Sheets("Rapor").Range("D4").Value
TextBox16 = Format(TextBox16, "#,0")
TextBox17.Value = Sheets("Rapor").Range("E4").Value
TextBox17 = Format(TextBox17, "#,0")
TextBox18.Value = Sheets("Rapor").Range("F4").Value
TextBox18 = Format(TextBox18, "#,0")
TextBox19.Value = Sheets("Rapor").Range("G4").Value
TextBox19 = Format(TextBox19, "#,0")
TextBox20.Value = Sheets("Rapor").Range("H4").Value
TextBox20 = Format(TextBox20, "#,0")
TextBox21.Value = Sheets("Rapor").Range("I4").Value
TextBox21 = Format(TextBox21, "#,0")
TextBox22.Value = Sheets("Rapor").Range("J4").Value
TextBox22 = Format(TextBox22, "#,0")
TextBox23.Value = Sheets("Rapor").Range("K4").Value
TextBox23 = Format(TextBox23, "#,0")
TextBox24.Value = Sheets("Rapor").Range("B3").Value
TextBox24 = Format(TextBox24, "#,0")
TextBox25.Value = Sheets("Rapor").Range("C3").Value
TextBox25 = Format(TextBox25, "#,0")
TextBox26.Value = Sheets("Rapor").Range("D3").Value
TextBox26 = Format(TextBox26, "#,0")
TextBox27.Value = Sheets("Rapor").Range("E3").Value
TextBox27 = Format(TextBox27, "#,0")
TextBox28.Value = Sheets("Rapor").Range("F3").Value
TextBox28 = Format(TextBox28, "#,0")
TextBox29.Value = Sheets("Rapor").Range("G3").Value
TextBox29 = Format(TextBox29, "#,0")
TextBox30.Value = Sheets("Rapor").Range("H3").Value
TextBox30 = Format(TextBox30, "#,0")
TextBox31.Value = Sheets("Rapor").Range("I3").Value
TextBox31 = Format(TextBox31, "#,0")
TextBox32.Value = Sheets("Rapor").Range("J3").Value
TextBox32 = Format(TextBox32, "#,0")
TextBox33.Value = Sheets("Rapor").Range("K3").Value
TextBox33 = Format(TextBox33, "#,0")

Call yenile
With Worksheets("U.P DATA (2016)")
son = .Range("A65536").End(3).Row
For i = 4 To son
ComboBox3.AddItem Format(.Cells(i, "A").Value, "dd.mm.yyyy")
Next i
End With

'ComboBox3.RowSource = "TARIH2016"
ComboBox3.Value = Format(Sheets("RAPOR").Range("A2").Value, "dd.mm.yyyy")
End Sub
Private Sub CommandButton1_Click()
Unload Me ' Form komple kapanır.
Application.Visible = True ' Excel programı gizli ise görünür olur.
Sheets("Rapor").Select ' Belirli bir sayfaya gitmesini istiyorsanız bu satırı da kullanabilirsiniz.
End Sub

Private Sub UserForm_QueryClose(Cancel As Integer, CloseMode As Integer)
If CloseMode = vbFormControlMenu Then
    MsgBox "Formdan çıkış için Kapat butonunu kullanınız. Veya Excel'e dön butonunu kullanınız. Ahmet ÖZGÜR"
    Cancel = True
End If
End Sub
Private Sub CommandButton2_Click()
ActiveWorkbook.Close
End Sub
Sub yenile()
TextBox34.Value = Sheets("Rapor").Range("B5").Value
TextBox34 = Format(TextBox34, "#,0")
TextBox35.Value = Sheets("Rapor").Range("C5").Value
TextBox35 = Format(TextBox35, "#,0")
TextBox36.Value = Sheets("Rapor").Range("D5").Value
TextBox36 = Format(TextBox36, "#,0")
TextBox37.Value = Sheets("Rapor").Range("E5").Value
TextBox37 = Format(TextBox37, "#,0")
TextBox38.Value = Sheets("Rapor").Range("F5").Value
TextBox38 = Format(TextBox38, "#,0")
TextBox39.Value = Sheets("Rapor").Range("G5").Value
TextBox39 = Format(TextBox39, "#,0")
TextBox40.Value = Sheets("Rapor").Range("H5").Value
TextBox40 = Format(TextBox40, "#,0")
TextBox41.Value = Sheets("Rapor").Range("I5").Value
TextBox41 = Format(TextBox41, "#,0")
TextBox42.Value = Sheets("Rapor").Range("J5").Value
TextBox42 = Format(TextBox42, "#,0")
TextBox43.Value = Sheets("Rapor").Range("K5").Value
TextBox43 = Format(TextBox43, "#,0")
End Sub
 
Geri
Üst