False file in use error, files used in macro

Jenawade

Board Regular
Joined
Apr 8, 2002
Messages
231
For some reason, I occasionally receive the file in use error when I try to open an excel file (ever since our IT department upgraded my computer to Excel 2007) - when the file is NOT in use. Either I check with the coworker who is named as having the file open, or I'm listed myself and I haven't opened that file in days. I have recently taken over running a large, multi-part macro one of my coworkers created, but 2 out of 5 times something goes wrong with the data, and we're both wondering if it's because of that file in use error, as there is a lot of both reading and writing from various excel files. Does anyone know of a solution to this problem? Is there something I can add in the macro to accommodate the file in use message for a file the macro needs to write to?
 

Excel Facts

Does the VLOOKUP table have to be sorted?
No! when you are using an exact match, the VLOOKUP table can be in any order. Best-selling items at the top is actually the best.
I would look for a temp file in the directory (I'm not sure why but it seems that Excel 2007 creates these temp files and that may be what's kicking the "file in use message").

In any case, this is generally the result of an improper exit or a crash. I would consider your code untrustworthy until you find out why this is happening - also I'd avoid running macros on files that actually do have a likelihood of being in use by other users (shared files, commonly accessed files in a department, and so on).
 
Upvote 0
I like to keep my "private copies" of files that I run my code on, then copy to public folders to release "public" versions. But these are off course not shared files strictly speaking - just files I maintain that others are viewing (basically, reports or charts).
 
Upvote 0

Forum statistics

Threads
1,224,566
Messages
6,179,551
Members
452,927
Latest member
rows and columns

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