Run-time error 1004 "Can't find file"

Beachson

Active Member
Joined
Oct 28, 2009
Messages
468
I have a task built in "Windows Task Manager" that is set to open a batch file (.bat) automatically at a specific time a day everyday.

That batch file is set to open an excel file loaded with an auto macro (.xlsm)

The code in the macro opens a specific workbook from a shared network drive ...

Code:
Workbooks.Open Filename:="V:\vai\IORPIASCH.CSV"

This has been working perfectly for months and months ...

All of the sudden I am getting the following error when the above code is attempted ...

Run-time error '1004':

Sorry, we couldn't find V:\vai\IORPIASCH.CSV. Is it possible it was moved, renamed or deleted?

Here is what confuses me most ...

If I simply open ANY excel file. Even a blank workbook ... my task kicks off just fine. If I open the batch file manually instead of automatically opening it with task manager ... it works fine ... but if I close excel down and try to kick the task off from task manager I am getting the error.

I have uninstalled and reinstalled excel.

I am accessing a file in a shared network drive in the above code. I am inclined to think this has something to do with it because if I switch the above code to open a local file on my PC's desktop, the task will kick off just fine no matter what.

What is the difference between automatically opening files from task manager and manually opening them?

Also, what is the difference between automatically opening files from task manager with excel open and automatically opening files from task manager with excel closed?

Thank you for your help
 

Excel Facts

Easy bullets in Excel
If you have a numeric keypad, press Alt+7 on numeric keypad to type a bullet in Excel.

Forum statistics

Threads
1,223,909
Messages
6,175,315
Members
452,634
Latest member
cpostell

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top