I have a macro in microsoft access that I have set-up on a windows scheduler. It's supposed to run every morning to load data before I come in. When I run the code while I'm logged into the computer the code runs fine, but when it runs on the scheduler I always get the following error:
error code: 1004
Description: Microsoft Office Excel cannot access the file 'C:\MLX Zipped Files\Master Trade Date Activity 2222_500448_4636_PP.XLS'. There are several possible reasons:
• The file name or path does not exist.
• The file is being used by another program.
• The workbook you are trying to save has the same name as a currently open workbook.
For some reason the code always hangs on saving the excel file changes that have been. The following code line:
eWBK.SaveAs sDestination, xlOpenXMLWorkbook, "", "", , , xlNoChange, xlLocalSessionChanges
I don't understand why it has trouble saving this file when running on the macro, because when I kick off the code it runs fine.