gicimi
Altın Üye
- Katılım
- 3 Şubat 2008
- Mesajlar
- 593
- Excel Vers. ve Dili
- Office 2016 Eng. 64 Bit
DOSYA İndirmek/Yüklemek için ÜCRETLİ ALTIN ÜYELİK Gereklidir!
Altın Üyelik Hakkında Bilgi
Sub verial_ado()
Dim con As Object, rs As Object
Set con = CreateObject("Adodb.connection")
Set rs = CreateObject("Adodb.recordset")
con.Open "Provider=microsoft.ace.oledb.12.0;data source=" & ThisWorkbook.Path & _
"\Kapalı Dosya.xlsx;extended properties=""excel 12.0;hdr=yes"""
rs.Open "select * from[Sheet1$] where [Gönderilen BÖLGE]='" & Range("B1").Value & "';", con, 1, 3
Application.ScreenUpdating = False
Range("A4").CopyFromRecordset rs
Application.ScreenUpdating = True
rs.Close: con.Close
Set rs = Nothing: Set con = Nothing
MsgBox "Veriler alındı."
End Sub