Don't think that is possible once file has been opened but could be wrong!
My understanding is that by default, all files created and opened in
Microsoft Excel are read write files. This applies not only to Microsoft
Excel but almost all other applications. Also, a file cannot be created read
only just because if you create a read only file you can never edit it. But
you can make a file read only so that others don't tamper with it.
To make a Excel file read only (Microsoft Excel 2003),
Goto Tools ->Options->Security (The Tools menu in the worksheet menu bar)
Check the READ-ONLY RECOMMENDED box.
This would make your file read only and when the file is opened, it would
prompt you with the message box whether you want the file to be opened in
read only mode or not. If you click YES, the file would open in read only
mode. If you click NO, the file would open in read write mode and you can
save your changes.
For Microsoft Excel 2000 and other previous versions
Goto File->Save As
Click the TOOLS button on the right corner and select GENERAL OPTIONS
Now check the READ-ONLY RECOMMENDED box.
This works well in Microsoft Excel 2003 also.
The above option, though making the file read only, gives the user the
option to edit it. So even if an user unknowingly presses the NO button ,
when prompted for read only opening, he may still be able to edit the file.
If you want to prevent this then,
Navigate to your file through Windows Explorer or the File Open Box and
select it.
RIGHT CLICK and select PROPERTIES
Check the READ ONLY box.
This always open the file read only and even if you already made your file
read only, by using the first option, this overrides it since this function
is part of the operating system rather than the application. To make the file
read write again, just uncheck the READ ONLY box.
This may not be what you were looking for but may give you another idea how
to resolve your requirement
Hope helpful