DOSYA İndirmek/Yüklemek için ÜCRETLİ ALTIN ÜYELİK Gereklidir!
Altın Üyelik Hakkında Bilgi
Private Sub CommandButton1_Click()
Dim baslangic_tar As Date, bitis_tar As Date, urun As String
Dim i As Long, k As Byte, a As Long
If Not IsDate(ComboBox1.Value) Then
MsgBox "Başlangıç tarihi yanlış.Listeleme yapılmadı..", vbCritical, "UYARI"
ComboBox1.SetFocus
Exit Sub
End If
If Not IsDate(ComboBox2.Value) Then
MsgBox "Son tarih yanlış.Listeleme Yapılmadı..!!", vbCritical, "UYARI"
ComboBox2.SetFocus
Exit Sub
End If
ListBox1.RowSource = vbNullString
baslangic_tar = CDate(ComboBox1.Value)
bitis_tar = CDate(ComboBox2.Value)
ReDim myarr(1 To 6, 1 To 1)
For i = 2 To Cells(65536, "B").End(xlUp).Row
If ComboBox3.Value = "" Then
urun = Cells(i, "C").Value
Else
urun = ComboBox3.Value
End If
If Cells(i, "F").Value >= baslangic_tar And Cells(i, "F").Value <= bitis_tar And _
urun = Cells(i, "C").Value Then
a = a + 1
ReDim Preserve myarr(1 To 6, 1 To a)
For k = 1 To 6
myarr(k, a) = Cells(i, k + 2)
Next k
End If
Next i
If a > 0 Then ListBox1.Column = myarr
Erase myarr
End Sub
Sayın everen hocam çokteşekkürler yardımlarınızdan dolayı
Range("A1").AutoFilter Field:=12, Criteria1:=a<>0