doug, the function worked fine the first couple of times, but today i received an error message : Run-time error '3274' External table isn't in the specified format.<br>
<br>
i double checked the code and it hasn't changed. is there anything i need to do in the macro that calls this procedure besides running it??<br>
<br>
i am very very new to using mods and any VB<br>
<br>
ORIGINAL QUESTION:<br>
<br>
I am outputting a simple query to MS Excel using the OutputTo action in a macro, my problem is that the file is created in Excel 95 format and I would like it to be in Excel 97.<br>
<br>
Once in Excel I am able to change the format, but I was hoping there is a way in Access to have the query Output in Excel 97.<br>
<br>
Thanks for your assistance. <br>
<br>
DougP (MIS) Jan 26, 2000 <br>
Now if you are in Access '97 then you could write function<br>
like this<br>
<br>
Public Function ExportExcel97()<br>
DoCmd.TransferSpreadsheet acExport, acSpreadsheetTypeExcel97, "MyQuery", "c:\NewExcel97File.xls"<br>
End Function<br>
<br>
<br>
i double checked the code and it hasn't changed. is there anything i need to do in the macro that calls this procedure besides running it??<br>
<br>
i am very very new to using mods and any VB<br>
<br>
ORIGINAL QUESTION:<br>
<br>
I am outputting a simple query to MS Excel using the OutputTo action in a macro, my problem is that the file is created in Excel 95 format and I would like it to be in Excel 97.<br>
<br>
Once in Excel I am able to change the format, but I was hoping there is a way in Access to have the query Output in Excel 97.<br>
<br>
Thanks for your assistance. <br>
<br>
DougP (MIS) Jan 26, 2000 <br>
Now if you are in Access '97 then you could write function<br>
like this<br>
<br>
Public Function ExportExcel97()<br>
DoCmd.TransferSpreadsheet acExport, acSpreadsheetTypeExcel97, "MyQuery", "c:\NewExcel97File.xls"<br>
End Function<br>
<br>