Excel – Error message pops up every time I start Excel – how to get rid of it

excelexcel-2007vba

I am using Excel 2007 at work. A few months ago I wrote a VBA script which referenced some files on our network drive. Ever since that day, whenever I fire up Excel (any file, not just the file I was working with), I get this message:

\(network file path)(dir)\test.csv' could not be found. Check the
spelling of the file name, and verify that the file location is
correct.

If you are trying to open the file from your list of most recently
used files, make sure that the file has not been renamed, moved, or
deleted.

The file it's referencing was a test file we used to debug, and it has been deleted. I noticed that if I add the file back to its location, the error goes away (which makes sense, since it can now find the file). But, it seems very odd to me that every time I start Excel it does a query for that file. Any ideas on how to stop this behavior?

Best Answer

You say the at startup open all files in field is empty, but what about your start folder itself?

While Excel is closed, open Windows Explorer, type this in the address %appdata%\Microsoft\Excel\XLSTART and press enter.

The easty fix would be that XLSTART has a shortcut to the missing file. If so, delete it.

If that didn't fix your problem try temporarily removing all files in XLSTART. (Move them to your desktop or some place easy.) Restart Excel, do you still get the error?

Assuming you don't get the error, open the files you removed from XLSTART one by one to see which one is causing the error.

Related Topic