You can tell if it is in that module by first double clicking the word
"ThisWorkbook" to make sure you are viewing it, before pasting in the
code. See
http://www.rondebruin.nl/code.htm if you need assistance
locating this module or pasting in the code.
I really couldn't say what the outcome will be, due to the fact that
it is being viewed on an intranet and I am unfamiliar with the
particular conditions at your site. Test it out by opening the
workbook and carefully noting any startup messages you get from Excel
(i.e. "Open As Read only?" etc) and whether it says [Read Only] in the
Title Bar. Then make some changes and try to close the file. If
successful, the code should allow your workbook to close silently,
discarding the changes. Open the workbook again and see if your
changes were discarded. If so, congratulations! It works.
Otherwise, you can just change the code to prevent saving altogether.
I think that was your goal anyway.
Private Sub Workbook_BeforeClose(Cancel As Boolean)
ThisWorkbook.Saved = True
End Sub
--JP
Yes, there are 4 modules plus the This Workbook, how can I tell if it is in
the ThisWork Module. FYI - I did not select read-only in Options, the
document is password protected and it automatically opens on the web as a
read-only document. Would any of this impact the procedure?