Kill file when someone has it opened

hutchisd

New Member
Joined
Feb 16, 2009
Messages
49
I used the "kill" function to delete a file that I replace daily on a shared network drive. The file is a read-only excel file. If I happen to replace the file while someone has it opened using the kill function, would I get an error and also what would the user who has it opened experience? I figured I'd ask here instead of doing a test with a coworker.
 

Excel Facts

Is there a shortcut key for strikethrough?
Ctrl+S is used for Save. Ctrl+5 is used for Strikethrough. Why Ctrl+5? When you use hashmarks to count |||| is 4, strike through to mean 5.
The file will be killed, no error message. But there would be an error if you try to kill it again (when it no longer exists). However, the user who opened it still has a read-only copy in memory on their machine -- it doesn't disappear before their eyes and I think they experience nothing at all. If they close without saving it is gone. But if they try to save the file, they will have the option of saving it with a new name (note: a user would not be able to save the file with the old name b/c Excel will not allow this).

I *believe* you could create a new file on disk after killing the old one, even with the user having a read-only copy of the original still on their machine.
 
Last edited:
Upvote 0
The file will be killed, no error message. But there would be an error if you try to kill it again (when it no longer exists). However, the user who opened it still has a read-only copy in memory on their machine -- it doesn't disappear before their eyes and I think they experience nothing at all. If they close without saving it is gone. But if they try to save the file, they will have the option of saving it with a new name (note: a user would not be able to save the file with the old name b/c Excel will not allow this ... *but* a user *could* save a copy with a temporary name, and then re-save that copy with the original name, thus restoring the file).

(My co-workers are used to me experimenting on them ;) )

It sounds like you've tested this out before...lol. Thanks for the info!
 
Upvote 0

Forum statistics

Threads
1,215,176
Messages
6,123,470
Members
449,100
Latest member
sktz

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