- Katılım
- 3 Mart 2009
- Mesajlar
- 519
- Excel Vers. ve Dili
- excel 2003 tr
Private Sub ListBox1_DblClick(ByVal Cancel As MSForms.ReturnBoolean)
Dim baglanti As Object, yer As Object, sayfa As Object
Set baglanti = New ADODB.Connection
Set yer = New ADODB.Recordset
ListBox2.Clear
baglanti.Open "Provider=Microsoft.Ace.Oledb.12.0;Data Source=" & _
ThisWorkbook.Path & "\KartP\mutlu.xlsx ;Extended Properties='Excel 12.0 Macro;HDR=YES';"
yer.Open "Select * From [Sayfa1$];", baglanti, 1, 1
With ListBox2
.AddItem
.ColumnCount = 1
.List(0, 0) = yer(0)
End With
Label1.Caption = ""
Label1.Caption = ListBox1.Value
yer.Close
baglanti.Close
End Sub
kırmızı ile olan bölüme listbox1.value degeri verince kod çalışmıyor
bu sorunu nasıl çöze biliriz
Dim baglanti As Object, yer As Object, sayfa As Object
Set baglanti = New ADODB.Connection
Set yer = New ADODB.Recordset
ListBox2.Clear
baglanti.Open "Provider=Microsoft.Ace.Oledb.12.0;Data Source=" & _
ThisWorkbook.Path & "\KartP\mutlu.xlsx ;Extended Properties='Excel 12.0 Macro;HDR=YES';"
yer.Open "Select * From [Sayfa1$];", baglanti, 1, 1
With ListBox2
.AddItem
.ColumnCount = 1
.List(0, 0) = yer(0)
End With
Label1.Caption = ""
Label1.Caption = ListBox1.Value
yer.Close
baglanti.Close
End Sub
kırmızı ile olan bölüme listbox1.value degeri verince kod çalışmıyor
bu sorunu nasıl çöze biliriz
