Farklı formatta başka bir dosyamda çalışan aşağıdaki kodar yeni dosyamda hata veriyor. Listbox içerisinde çift tıkladığımda TextBox1 satırında bu hatayı veriyor.
Kodlar aşığada;
Private Sub ListBox1_DblClick(ByVal Cancel As MSForms.ReturnBoolean)
If ListBox1.List(ListBox1.ListIndex, 8) = "" Then
Sat = ListBox1.ListIndex + 2
Else
Sat = ListBox1.List(ListBox1.ListIndex, 8)
End If
TextBox1.Text = Cells(Sat, "A")
TextBox2.Text = Cells(Sat, "B")
ComboBox3.Text = Cells(Sat, "C")
TextBox5.Text = Cells(Sat, "E")
TextBox6.Text = Cells(Sat, "F")
TextBox7.Text = Cells(Sat, "G")
TextBox12.Text = Cells(Sat, "H")
TextBox13.Text = Cells(Sat, "I")
TextBox8.Text = Cells(Sat, "J")
TextBox9.Text = Cells(Sat, "K")
TextBox10.Text = Cells(Sat, "L")
TextBox11.Text = Cells(Sat, "M")
TextBox14.Text = Cells(Sat, "N")
ComboBox1.Text = Cells(Sat, "O")
ComboBox2.Text = Cells(Sat, "P")
TextBox17.Text = Cells(Sat, "Q")
End Sub
Kodlar aşığada;
Private Sub ListBox1_DblClick(ByVal Cancel As MSForms.ReturnBoolean)
If ListBox1.List(ListBox1.ListIndex, 8) = "" Then
Sat = ListBox1.ListIndex + 2
Else
Sat = ListBox1.List(ListBox1.ListIndex, 8)
End If
TextBox1.Text = Cells(Sat, "A")
TextBox2.Text = Cells(Sat, "B")
ComboBox3.Text = Cells(Sat, "C")
TextBox5.Text = Cells(Sat, "E")
TextBox6.Text = Cells(Sat, "F")
TextBox7.Text = Cells(Sat, "G")
TextBox12.Text = Cells(Sat, "H")
TextBox13.Text = Cells(Sat, "I")
TextBox8.Text = Cells(Sat, "J")
TextBox9.Text = Cells(Sat, "K")
TextBox10.Text = Cells(Sat, "L")
TextBox11.Text = Cells(Sat, "M")
TextBox14.Text = Cells(Sat, "N")
ComboBox1.Text = Cells(Sat, "O")
ComboBox2.Text = Cells(Sat, "P")
TextBox17.Text = Cells(Sat, "Q")
End Sub
