I'm using below code to write access data in new worbook and the below code works fine
MyConn="C:\Users\shariqk\Desktop\Document\BT\Access Test\BT SAMPLE.mdb"
sSQL= "SELECT " & TableCOl & " INTO [Data] IN '' [Excel 8.0;Database=" & ActiveWorkbook.Path & "\book1.xls] FROM " & Tablename & ";"
Set Cn = New ADODB.Connection
With Cn
.Provider = "Microsoft.Jet.OLEDB.4.0"
.Open MyConn
Set Rs = .Execute(sSQL)
End With
but when i want data is new version of excel(coz my data is more tan 65k), i'm getting ISAM error. below is the code
MyConn="C:\Users\shariqk\Desktop\Document\BT\Access Test\BT SAMPLE.mdb"
sSQL= "SELECT " & TableCOl & " INTO [Data] IN '' [Excel 10.0;Database=" & ActiveWorkbook.Path & "\book1.xlsx] FROM " & Tablename & ";"
Set Cn = New ADODB.Connection
With Cn
.Provider = "Microsoft.Jet.OLEDB.4.0"
.Open MyConn
Set Rs = .Execute(sSQL)
End With
Please help.
Bookmarks