Forumda emeği geçen herkese merhaba. Arkadaşlar bir butona atadığım aşağıdaki kodlar son satır hariç doğru çalışıyor. Fakat son satır run-time error
380 diye bir hata veriyor. (son satır = ListBox1.List(ListBox1.ListCount - 1, 10) = .Cells(i, "Q").Value ). Bu satırı sildiğimde kodlar çalışıyor. Eklediğimde hata veriyor. Nasıl bir yanlışlık yaptım acaba ? İlgilenen arkadaşlara
şimdiden teşekkürler.
Dim syf3 As Worksheet
Set syf3 = Worksheets("MAÇ_PROĞRAMI")
ListBox1.Clear
Dim i As Byte
ListBox1.ColumnCount = 11
ListBox1.ColumnWidths = "25;80;120;120;50;30;30;30;30;30;40"
With syf3
For i = 4 To 16
ListBox1.AddItem .Cells(i, "E").Value ' E sütunu
ListBox1.List(ListBox1.ListCount - 1, 1) = .Cells(i, "F").Value ' F Sütunu
ListBox1.List(ListBox1.ListCount - 1, 2) = .Cells(i, "G").Value ' G Sütunu
ListBox1.List(ListBox1.ListCount - 1, 3) = .Cells(i, "I").Value ' I Sütunu
ListBox1.List(ListBox1.ListCount - 1, 4) = .Cells(i, "J").Value ' j Sütunu
ListBox1.List(ListBox1.ListCount - 1, 5) = .Cells(i, "K").Value ' K Sütunu
ListBox1.List(ListBox1.ListCount - 1, 6) = .Cells(i, "L").Value ' L Sütunu
ListBox1.List(ListBox1.ListCount - 1, 7) = .Cells(i, "M").Value ' M Sütunu
ListBox1.List(ListBox1.ListCount - 1, 8) = .Cells(i, "N").Value ' N Sütunu
ListBox1.List(ListBox1.ListCount - 1, 9) = .Cells(i, "O").Value ' O Sütunu
ListBox1.List(ListBox1.ListCount - 1, 10) = .Cells(i, "Q").Value ' Q Sütunu
Next i
End With
i = Empty
380 diye bir hata veriyor. (son satır = ListBox1.List(ListBox1.ListCount - 1, 10) = .Cells(i, "Q").Value ). Bu satırı sildiğimde kodlar çalışıyor. Eklediğimde hata veriyor. Nasıl bir yanlışlık yaptım acaba ? İlgilenen arkadaşlara
şimdiden teşekkürler.
Dim syf3 As Worksheet
Set syf3 = Worksheets("MAÇ_PROĞRAMI")
ListBox1.Clear
Dim i As Byte
ListBox1.ColumnCount = 11
ListBox1.ColumnWidths = "25;80;120;120;50;30;30;30;30;30;40"
With syf3
For i = 4 To 16
ListBox1.AddItem .Cells(i, "E").Value ' E sütunu
ListBox1.List(ListBox1.ListCount - 1, 1) = .Cells(i, "F").Value ' F Sütunu
ListBox1.List(ListBox1.ListCount - 1, 2) = .Cells(i, "G").Value ' G Sütunu
ListBox1.List(ListBox1.ListCount - 1, 3) = .Cells(i, "I").Value ' I Sütunu
ListBox1.List(ListBox1.ListCount - 1, 4) = .Cells(i, "J").Value ' j Sütunu
ListBox1.List(ListBox1.ListCount - 1, 5) = .Cells(i, "K").Value ' K Sütunu
ListBox1.List(ListBox1.ListCount - 1, 6) = .Cells(i, "L").Value ' L Sütunu
ListBox1.List(ListBox1.ListCount - 1, 7) = .Cells(i, "M").Value ' M Sütunu
ListBox1.List(ListBox1.ListCount - 1, 8) = .Cells(i, "N").Value ' N Sütunu
ListBox1.List(ListBox1.ListCount - 1, 9) = .Cells(i, "O").Value ' O Sütunu
ListBox1.List(ListBox1.ListCount - 1, 10) = .Cells(i, "Q").Value ' Q Sütunu
Next i
End With
i = Empty
