Kod:
Private Sub ListBox1_Click()
TextBox1 = ListBox1.Column(0)
TextBox2 = ListBox1.Column(1)
TextBox3 = ListBox1.Column(2)
TextBox4 = ListBox1.Column(3)
TextBox5 = ListBox1.Column(4)
TextBox6 = ListBox1.Column(5)
TextBox7 = ListBox1.Column(6)
TextBox8 = ListBox1.Column(7)
TextBox9 = ListBox1.Column(8)
TextBox10 = ListBox1.Column(9)
Label58.Caption = ListBox1.Column(10)
Label59.Caption = ListBox1.Column(11)
Label60.Caption = ListBox1.Column(12)
TextBox11 = ListBox1.Column(13)
TextBox12 = ListBox1.Column(14)
TextBox13 = ListBox1.Column(15)
TextBox14 = ListBox1.Column(16)
TextBox15 = ListBox1.Column(17)
TextBox16 = ListBox1.Column(18)
End Sub
Kod:
Private Sub UserForm_Initialize()
Dim sat, s As Integer
With ListBox1
.Clear
.ColumnCount = 1
.ColumnWidths = "160"
End With
For sat = 2 To Sheets("Database").Cells(65536, "b").End(xlUp).Row
ListBox1.AddItem
ListBox1.List(s, 0) = Sheets("Database").Cells(sat, "b")
ListBox1.List(s, 1) = Sheets("Database").Cells(sat, "c")
ListBox1.List(s, 2) = Sheets("Database").Cells(sat, "d")
ListBox1.List(s, 3) = Sheets("Database").Cells(sat, "e")
ListBox1.List(s, 4) = Sheets("Database").Cells(sat, "f")
ListBox1.List(s, 5) = Sheets("Database").Cells(sat, "g")
ListBox1.List(s, 6) = Sheets("Database").Cells(sat, "h")
ListBox1.List(s, 7) = Sheets("Database").Cells(sat, "i")
ListBox1.List(s, 8) = Sheets("Database").Cells(sat, "j")
ListBox1.List(s, 9) = Sheets("Database").Cells(sat, "l")
ListBox1.List(s, 10) = Sheets("Database").Cells(sat, "m")
ListBox1.List(s, 11) = Sheets("Database").Cells(sat, "n")
ListBox1.List(s, 12) = Sheets("Database").Cells(sat, "o")
ListBox1.List(s, 13) = Sheets("Database").Cells(sat, "p")
ListBox1.List(s, 14) = Sheets("Database").Cells(sat, "q")
ListBox1.List(s, 15) = Sheets("Database").Cells(sat, "r")
ListBox1.List(s, 15) = Sheets("Database").Cells(sat, "s")
ListBox1.List(s, 15) = Sheets("Database").Cells(sat, "t")
ListBox1.List(s, 16) = Sheets("Database").Cells(sat, "k")
s = s + 1
Next
End Sub
arkadaşlar bu kod runtime hatası veriyor çözemedim bir türlü yardımcı olabilirmisiniz.
