M
Manuelauch
The codes below work in ACCESS 2003, but do not work in ACCESS 2007. I use it
to retrieve the data from EXCEL to ACCESS , butt failed in cnNet.Open line of
code
stFilePathAndName = "C\TEMP\Test.xls"
cnNet.Provider = "Microsoft OLE DB Provider for ODBC Drivers"
cnNet.ConnectionString = "DRIVER={Microsoft Excel Driver (*.xls)};DBQ="
& stFilePathAndName & ";"
cnNet.Open
cnNet.CursorLocation = adUseClient
'Rage in the EXCEL file is PARAMETER_RANGE
Set rstNet = cnNet.Execute("PARAMETER_RANGE")
to retrieve the data from EXCEL to ACCESS , butt failed in cnNet.Open line of
code
stFilePathAndName = "C\TEMP\Test.xls"
cnNet.Provider = "Microsoft OLE DB Provider for ODBC Drivers"
cnNet.ConnectionString = "DRIVER={Microsoft Excel Driver (*.xls)};DBQ="
& stFilePathAndName & ";"
cnNet.Open
cnNet.CursorLocation = adUseClient
'Rage in the EXCEL file is PARAMETER_RANGE
Set rstNet = cnNet.Execute("PARAMETER_RANGE")