- Katılım
- 30 Ocak 2008
- Mesajlar
- 154
- Excel Vers. ve Dili
- offis 2003
arkadaşlar kodun cıktı resmi yukarıdadır. göründüğü gibi belirlediğimiz tarihler arasındaki verileri listeliyor. burada userform1 de 2 adet combobox bir listbox birde buton kullanıkmaktadır. ben bunu benim kendi uygulamama adapte edemedimPrivate Sub ComboBox1_Change()
ComboBox1.Value = Format(ComboBox1.Value, "dd.mm.yyyy")
End Sub
Private Sub ComboBox2_Change()
ComboBox2.Value = Format(ComboBox2.Value, "dd.mm.yyyy")
End Sub
Private Sub CommandButton1_Click()
If ComboBox1.Value = "" Or ComboBox2.Value = "" Then
MsgBox "Lütfen Tarih seçiniz", vbCritical, "TARİH SEÇME HATASI"
Exit Sub
End If
Label1.Caption = ComboBox1.Value
Label2.Caption = ComboBox2.Value
Dim i As Long
ListBox1.Clear
For i = 2 To Range("a65536").End(3).Row
If CLng(CDate(Cells(i, "a").Value)) >= CLng(CDate(ComboBox1.Value)) And CLng(CDate(Cells(i, "a").Value)) <= CLng(CDate(ComboBox2.Value)) Then
With ListBox1
.AddItem Format(Cells(i, 1).Value, "dd.mm.yyyy")
.List(.ListCount - 1, 1) = Cells(i, 2).Value
.List(.ListCount - 1, 2) = Cells(i, 3).Value
.List(.ListCount - 1, 3) = Cells(i, 4).Value
End With
End If
Next i
i = Empty
End Sub
Private Sub Label1_Click()
End Sub
Private Sub Label3_Click()
End Sub
Private Sub ListBox1_Click()
End Sub
Private Sub UserForm_Initialize()
ComboBox1.RowSource = "AA!a2:a" & Worksheets("aa").Range("a65536").End(3).Row
ComboBox2.RowSource = "AA!a2:a" & Worksheets("aa").Range("a65536").End(3).Row
ListBox1.ColumnCount = 4
ListBox1.ColumnWidths = "40,60,60,60"
End Sub
__________________________
buda benim kullandığım uygulama . userform1 de 2 adet
combobox5 ve
combobox6 ekliyorum
listbox2
commandbutton3
benim userform1 de kullandıklarım bunlar. sizden istediğim şu kodu benim sayfaya uyarlayabilirmisiniz. ben ekledim yanlız bi tarafında bişeyleri eksik düzenledim gibi listbox2 de göstermiyor örnekde sayfa ismi AA benim KAZNA_BAKIM gibi yardımcı olurmusunuz?