Sub VeriAl_alansiz()
Dim con As ADODB.Connection
Set con = New ADODB.Connection
con.Open "provider=microsoft.ace.oledb.12.0;data source=" & ThisWorkbook.FullName & ";extended properties=""excel 8.0;hdr=yes;"""
yol = ThisWorkbook.Path & Application.PathSeparator
yol2 = Dir(yol & "*xlsx")
With ThisWorkbook.Sheets("TümVeri")
.Range("A2:Q" & Rows.Count).Clear
Do Until yol2 = ""
txtSql = "INSERT INTO [TümVeri$] " & _
"SELECT * " & _
"FROM [MEMURLAR$] IN '" & yol & yol2 & "'[EXCEL 8.0;] " & _
"where ([SİCİL] Is Not Null);"
con.Execute txtSql
yol2 = Dir
Loop
End With
con.Close: Set con = Nothing
MsgBox "Bitti", vbInformation, "Bilgi"
End Sub
yada alanları kullanmadan