Alttaki kodla sorun çözüldü.
sadece cnn.CursorLocation = adUseClient bunu silmek istedim hata verdi.
Birde Reference(Verweice) den Microsoft Activex Data object 2.8 Librariy den işaretlenmezse hata veriyor.
Sub GetTableNames() 'sistem Tablolarini getirmez
'Reference(Verweice) den Microsoft Activex Data object 2.8 Librariy secilecek
Dim cnn As Object
Dim rs As Object
Dim lRow As Long
Dim szConnect As String
With Sheets("kontrol")
.Range("A2:A" & Rows.Count).ClearContents
szConnect = "provider=Microsoft.ACE.OLEDB.12.0;Data Source=" & ThisWorkbook.Path & "\iller.accdb"
Set cnn = CreateObject("ADODB.Connection")
cnn.CursorLocation = adUseClient
cnn.Open szConnect
Set rs = cnn.openschema( _
adSchemaTables, _
Array(Empty, Empty, Empty, "Table"))
.Range(.Range("A2"), _
.Range("A2").Cells(rs.RecordCount)) _
.Value = Application.Transpose( _
rs.GetRows(, , "TABLE_NAME"))
End With
rs.Close
cnn.Close
End Sub
Excele Accessteki Tablo Adları Getirme
Konuyu Okuyanlar: 1 Ziyaretçi