Hi

I've got an issue but not sure if it's related to excel or to the batch code I use.

I'm using a batch file so that I can schedule a process to run the file "Book1.xls".

When I run the batch file, which opens Book1.xls, it gives me this error when I use the code Application.Workbooks("Book2.xls").Close {where I use Book1.xls to close the (already) open excel Book2.xls}

But when I run Book1.xls by double-clicking and enabling macros, it runs perfectly.

Any ideas in terms of batch code? This is the code I'm using:

@echo off

echo off

SET PROD_Folder=S:\General\Team\

"C:\Program Files\OFFICE11\EXCEL.EXE" "E:\Excel_Practise\Book1.xls" /p".\" /e

echo Copy to prefered location!

copy "E:\Excel_Practise\Book2.xls" "%PROD_Folder%Book2.xls"

echo DONE!

exit

* My excel code saves the file Book1.xls and places it as Book2.xls at the "PROD_Folder" location.

Can anyone help me on this?

Justin