>Cetin:
>
>For some reason, the database doesn't like the 'xlExcel2' at the end of the SaveAs. Do you know why this may be? It's telling me that the variable 'xlExcel2' is not defined. Apparently, it's reading it as a variable and not as an object name. Your thoughts?
>
>Thierry
Thierry,
It's a constant value and defined as 16. In the code I sent I should have included :
#define xlExcel2 16
and again pls beware this is for Excel8 (Excel97). I don't know values for Excel95 (and correct syntax). If you're using Excel95, you could get the correct value :
-Open Excel
-Select tools\macro\VB editor
-Press F2 to bring up "Object browser"
-Find needed xlConstant type ie: xlFileFormat
-On right window click needed Constant ie: xlExcel2
-Below the window constant value is displayed
Cetin