okla gösterilen alanlar ekleme süresini görmek içindir, silinebilirler
Private Sub CommandButton1_Click()
t1 = Now'<--Silinebilir
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
If WorksheetFunction.CountA(.Range("B2:B" & Rows.Count)) > 0 Then
son = .Range("B" & Rows.Count).End(3).Row
.Range("A2").Value = 1
.Range("A2:A" & son).DataSeries Rowcol:=xlColumns, Type:=xlLinear, Date:=xlDay, Step:=1, Stop:=son
End If
'Alan dönüşüm_______________________________________
.Range("B2:B" & son).NumberFormat = "0"
.Range("B2:B" & son).Value = .Range("B2:B" & son).Value
.Range("D2" & son).NumberFormat = "0"
.Range("D2" & son).Value = .Range("D2" & son).Value
.Range("F2" & son).NumberFormat = "0"
.Range("F2:F" & son).Value = .Range("F2:F" & son).Value
'_________________________________________________
End With
con.Close: Set con = Nothing
t2 = Now'<--Silinebilir
Debug.Print "Tur", t1, t2, DateDiff("s", t1, t2)'<--Silinebilir
MsgBox "Bitti", vbInformation, "Bilgi"
End Sub