Sub HHH() |
Dim cn As Object |
Dim rs As Object |
Set cn = CreateObject( "adodb.connection" ) |
Set rs = CreateObject( "adodb.recordset" ) |
cn.Open "Provider=Microsoft.Jet.OLEDB.4.0;Data Source=" & ThisWorkbook.Path & "\data1.mdb" |
rs.Open "select * from CANode" , cn |
Range( "a1" ).CopyFromRecordset rs |
rs.Close |
Set rs = Nothing |
cn.Close |
Set cn = Nothing |
End Sub |