Merhabalar,
bu kodu kullanarak kapalı bir excel dosyasının belirli bir sayfasındaki belirli bir hücreden veri çekip açık olan excel dosyamın belli bir hücresine nasıl aktarabilirim?
Private Sub CommandButton1_Click()
Dim hucre As String
Dim conn As Object, rs As Object
Set conn = CreateObject("AdoDb.Connection")
Set rs = CreateObject("AdoDb.Recordset")
conn.Open "Provider=microsoft.jet.oledb.4.0;data source=" & ThisWorkbook.path & _
"\Kopya rev.xls;extended properties=""excel 8.0;hdr=yes"""
rs.Open "Select * from [Sayfa1$];", conn, 1, 3
LastRow = Cells(65536, "A").End(xlUp).Row + 1
rs.movefirst
Cells(2, "N") = rs.RecordCount
rs.Close
conn.Close
Set rs = Nothing
Set conn = Nothing
MsgBox "Kapalı dosyadan veriler aktarıldı." & vbLf & _
"", vbOKOnly + vbInformation, ""
End Sub
come scaricare musica da youtube
bu kodu kullanarak kapalı bir excel dosyasının belirli bir sayfasındaki belirli bir hücreden veri çekip açık olan excel dosyamın belli bir hücresine nasıl aktarabilirim?
Private Sub CommandButton1_Click()
Dim hucre As String
Dim conn As Object, rs As Object
Set conn = CreateObject("AdoDb.Connection")
Set rs = CreateObject("AdoDb.Recordset")
conn.Open "Provider=microsoft.jet.oledb.4.0;data source=" & ThisWorkbook.path & _
"\Kopya rev.xls;extended properties=""excel 8.0;hdr=yes"""
rs.Open "Select * from [Sayfa1$];", conn, 1, 3
LastRow = Cells(65536, "A").End(xlUp).Row + 1
rs.movefirst
Cells(2, "N") = rs.RecordCount
rs.Close
conn.Close
Set rs = Nothing
Set conn = Nothing
MsgBox "Kapalı dosyadan veriler aktarıldı." & vbLf & _
"", vbOKOnly + vbInformation, ""
End Sub
come scaricare musica da youtube
Son düzenleme:
