T
Thomas Huang
Dear friends,
Below is a function that used for testing in Excel 2007 VBA.
------------------------------------------------------
Sub aa()
Set conn = CreateObject("ADODB.Connection")
conn.Open "provider=Microsoft.ACE.OLEDB.12.0;extended properties='excel 12.0;imex=1';data source=" & ThisWorkbook.FullName
Sql = "select A,B from [sheet1$A66000:E66005]"
Sheet1.Range("A2").CopyFromRecordset conn.Execute(Sql)
End Sub
Below is a function that used for testing in Excel 2007 VBA.
------------------------------------------------------
Sub aa()
Set conn = CreateObject("ADODB.Connection")
conn.Open "provider=Microsoft.ACE.OLEDB.12.0;extended properties='excel 12.0;imex=1';data source=" & ThisWorkbook.FullName
Sql = "select A,B from [sheet1$A66000:E66005]"
Sheet1.Range("A2").CopyFromRecordset conn.Execute(Sql)
End Sub