DOSYA İndirmek/Yüklemek için ÜCRETLİ ALTIN ÜYELİK Gereklidir!
Altın Üyelik Hakkında Bilgi
Sub kapali_aktar()
Dim conn As Object, rs As Object
Sheets("Sayfa1").Select
If Range("A1").Value = "" Then
MsgBox "A1 Hücresine Kod numarası giriniz.", vbCritical, "UYARI"
Range("A1").Select
Exit Sub
End If
Application.ScreenUpdating = False
Set conn = CreateObject("Adodb.connection")
Set rs = CreateObject("Adodb.recordset")
conn.Open "provider=microsoft.jet.oledb.4.0;data source=" & ThisWorkbook.Path & _
"\veriler.xls;extended properties=""excel 8.0;hdr=yes"""
rs.Open "select * from [Sayfa1$];", conn, 1, 1
rs.MoveFirst
Do While Not rs.EOF
If rs(0) = Range("A1").Value Then
For k = 1 To 3
sat = Cells(65536, k).End(xlUp).Row + 1
If sat >= 65533 Then
MsgBox "Satır doldu diğer kayıtlar girilmedi", vbCritical, "UYARI"
Exit Do
End If
Cells(sat, k).Value = rs(k - 1).Value
Next k
sat = Cells(65536, 5).End(xlUp).Row + 1
If sat >= 65533 Then
MsgBox "Satır doldu diğer kayıtlar girilmedi", vbCritical, "UYARI"
Exit Do
End If
Cells(sat, 5).Value = rs(3).Value
End If
rs.movenext
Loop
rs.Close
conn.Close
Set rs = Nothing
Set conn = Nothing
Application.ScreenUpdating = True
MsgBox "Aktarım yapıldı." & vbLf & _
"evrengizlen@hotmail.com", vbOKOnly + vbInformation, "E V R E N"
End Sub