Since you didn't mention what trigger the end of file condition, I could only assume the condition as end of file
a. you click the corner x to close the file, or
b. you use a macro to close the file
my solution is when you close the file, vba prompt you whether you want to 1. close & save the file, set file to read only , 2. close but not save file.
Only if you choose 1. vba will call a script file chkro.vbs in c:\ and save the xls file then close. If you choose 2. it will close the file only.
When chkro.vbs file is called, it will wait 5 seconds(time expect the most excel needed to close the file) then set attribute of the calling xls file to read only.
Here's a demo of the above http://www.freewebs.com/swhtam/YA/chkReadOnly.xls Alt-F11 for a clear view of the complete code. Ctrl-Shift-A or click corner x will activate closing macro
Here's the http://www.freewebs.com/swhtam/YA/chkro.vbs that need to be put in c:\ unless you change the vba code, this file can be changed by right click and edit, syntax actually is vb script.
Hope this helps.