This file might be a help:
http://www.bygsoftware.com/examples/...SqlRequest.zip
It's in the "Excel with Access Databases" section on page:
http://www.bygsoftware.com/examples/examples.htm
This workbook demonstrates how to get data direct from an MS Access table,
or from an open or closed MS Excel workbook using the workbook function
SQL.REQUEST.
Recently updated to show the use of SQL.REQUEST in the same workbook.
The code is open and commented.
--
Regards
Andy Wiggins
www.BygSoftware.com
Home of "Save and BackUp",
"The Excel Auditor" and "Byg Tools for VBA"
"Stuk" wrote in message
...
I have typed the following string into a cell in Excel
=SQL.REQUEST("DSN=Excel Files;DBQ=C:\Test SQL\test.xls", B1, 1, "Select *
from sheet1", TRUE)
The cell shows "#N/A". I am expecting it to return the values from the
"Test" spreadsheet to the spreadsheet where I typed the sql command. What
am I doing wrong?
Also, is there somewhere to look for examples and tips on this command and
sql syntax?