Kod:
Public Sub Excel_Access_Aktar()
Dim con As ADODB.Connection
Set con = New ADODB.Connection
sConString = "Provider=Microsoft.Jet.OLEDB.4.0; " _
& "Data Source=C:\WINDOWS\Desktop\Masa_ustu\makro\durum_ka rtı.mdb"
con.Open sConString
ShName = "SAG_SUBE"
'For Row = 2 To 924
b10 = Trim(Sheets(ShName).Cells(10, "B"))
b11 = Trim(Sheets(ShName).Cells(11, "B"))
b12 = Trim(Sheets(ShName).Cells(12, "B"))
b13 = Trim(Sheets(ShName).Cells(13, "B"))
b18 = Trim(Sheets(ShName).Cells(18, "B"))
b19 = Trim(Sheets(ShName).Cells(19, "B"))
b20 = Trim(Sheets(ShName).Cells(20, "B"))
b23 = Trim(Sheets(ShName).Cells(23, "B"))
b24 = Trim(Sheets(ShName).Cells(24, "B"))
b25 = Trim(Sheets(ShName).Cells(25, "B"))
b48 = Trim(Sheets(ShName).Cells(48, "B"))
b49 = Trim(Sheets(ShName).Cells(49, "B"))
b50 = Trim(Sheets(ShName).Cells(50, "B"))
b51 = Trim(Sheets(ShName).Cells(51, "B"))
g18 = Trim(Sheets(ShName).Cells(18, "G"))
g19 = Trim(Sheets(ShName).Cells(19, "G"))
g20 = Trim(Sheets(ShName).Cells(20, "G"))
h08 = Trim(Sheets(ShName).Cells(8, "H"))
h10 = Trim(Sheets(ShName).Cells(10, "H"))
h11 = Trim(Sheets(ShName).Cells(11, "H"))
h12 = Trim(Sheets(ShName).Cells(12, "H"))
h13 = Trim(Sheets(ShName).Cells(13, "H"))
's_Soy = Trim(Sheets(ShName).Cells(Row, "E"))
Strsql = "insert into is_durum ( B10, B11, B12, B13, B18, B19, B20, B23, B24, B25, B48, B49, B50, B51, G18, G19, G20, H8, H10, H11, H12, H13) " & _
" values( '" & b10 & "', '" & b11 & "','" & b12 & "','" & b13 & "','" & b18 & "','" & b19 & "','" & b20 & "','" & b23 & "','" & b24 & "','" & b25 & "','" & b48 & "','" & b49 & "','" & b50 & "','" & b51 & "','" & g18 & "','" & g19 & "','" & g20 & "','" & h08 & "','" & h10 & "','" & h11 & "','" & h12 & "','" & h13 & "' )"
con.Execute (Strsql)
' Next
con.Close
MsgBox "bitti"