Syn hocalarım;
kullanmış olduğum süz listbox' ında saat format bölümünde "Run-time error 381 Could not get the list property invalid property array index " hatası vermektedir listbox 11 sütundan oluşmaktadır satır sayısı 65536 dır.
bu hatanın sebebi nedir acaba yardımcı olusanız sevinirim
Private Sub CommandButton1_Click()
Dim baslangic_tar As Date, bitis_tar As Date, plaka As String
Dim I As Long, x As Long, k As Byte, A As Long
If Not IsDate(TextBox3.Value) Then
MsgBox "Başlangıç tarihi yanlış veya seçilmedi..", vbCritical, "UYARI"
TextBox3.SetFocus
Exit Sub
End If
If Not IsDate(TextBox4.Value) Then
MsgBox "Son tarih yanlış veya seçilmedi..!!", vbCritical, "UYARI"
TextBox4.SetFocus
Exit Sub
End If
ListBox1.RowSource = vbNullString
baslangic_tar = CDate(TextBox3.Text)
bitis_tar = CDate(TextBox4.Text)
ReDim myarr(1 To 11, 1 To 1)
For I = 2 To Cells(65536, "B").End(xlUp).Row
If ComboBox3.Value = "" Then
plaka = Cells(I, "C").Value
Else
plaka = ComboBox3.Value
End If
If Cells(I, 2).Value >= baslangic_tar And Cells(I, 2).Value <= bitis_tar And plaka = Cells(I, 3).Value Then
A = A + 1
ReDim Preserve myarr(1 To 11, 1 To A)
For k = 1 To 11
myarr(k, A) = Cells(I, k)
Next k
Else
End If
Next I
If A > 0 Then ListBox1.Column = myarr
Erase myarr
For x = 0 To 65536
ListBox1.List(x, 6) = Format(ListBox1.List(x, 6), "hh:mm")
ListBox1.List(x, 8) = Format(ListBox1.List(x, 8), "hh:mm")
Next x
With KAYIT_FORMU.ListBox1
.BackColor = vbYellow
.ColumnCount = 11
.ColumnWidths = "30;60;50;100;300;60;45;45;45;45;45"
.ForeColor = vbRed
If Sheets("VERİ").Range("A2") = Empty Then
.RowSource = Empty
Else
.RowSource = "VERİ!A2:K" & [VERİ!A65536].End(3).Row
End If
End With
End Sub
kullanmış olduğum süz listbox' ında saat format bölümünde "Run-time error 381 Could not get the list property invalid property array index " hatası vermektedir listbox 11 sütundan oluşmaktadır satır sayısı 65536 dır.
bu hatanın sebebi nedir acaba yardımcı olusanız sevinirim
Private Sub CommandButton1_Click()
Dim baslangic_tar As Date, bitis_tar As Date, plaka As String
Dim I As Long, x As Long, k As Byte, A As Long
If Not IsDate(TextBox3.Value) Then
MsgBox "Başlangıç tarihi yanlış veya seçilmedi..", vbCritical, "UYARI"
TextBox3.SetFocus
Exit Sub
End If
If Not IsDate(TextBox4.Value) Then
MsgBox "Son tarih yanlış veya seçilmedi..!!", vbCritical, "UYARI"
TextBox4.SetFocus
Exit Sub
End If
ListBox1.RowSource = vbNullString
baslangic_tar = CDate(TextBox3.Text)
bitis_tar = CDate(TextBox4.Text)
ReDim myarr(1 To 11, 1 To 1)
For I = 2 To Cells(65536, "B").End(xlUp).Row
If ComboBox3.Value = "" Then
plaka = Cells(I, "C").Value
Else
plaka = ComboBox3.Value
End If
If Cells(I, 2).Value >= baslangic_tar And Cells(I, 2).Value <= bitis_tar And plaka = Cells(I, 3).Value Then
A = A + 1
ReDim Preserve myarr(1 To 11, 1 To A)
For k = 1 To 11
myarr(k, A) = Cells(I, k)
Next k
Else
End If
Next I
If A > 0 Then ListBox1.Column = myarr
Erase myarr
For x = 0 To 65536
ListBox1.List(x, 6) = Format(ListBox1.List(x, 6), "hh:mm")
ListBox1.List(x, 8) = Format(ListBox1.List(x, 8), "hh:mm")
Next x
With KAYIT_FORMU.ListBox1
.BackColor = vbYellow
.ColumnCount = 11
.ColumnWidths = "30;60;50;100;300;60;45;45;45;45;45"
.ForeColor = vbRed
If Sheets("VERİ").Range("A2") = Empty Then
.RowSource = Empty
Else
.RowSource = "VERİ!A2:K" & [VERİ!A65536].End(3).Row
End If
End With
End Sub