Can you post a sample document and workbook that aligns with the code you are running so we can run the code and work out what your issue is?
Right off the bat I wouldn't be using a sql query to transfer the data into Excel - I would expect that to be writing to a Recordset, not to a worksheet.
__________________
Andrew Lockton
Chrysalis Design, Melbourne Australia
|