Take the 2-minute tour ×

Is it possible to disallow saving an Excel (.xls) file? (Should also work in Numbers on OSX)

share|improve this question

migrated from stackoverflow.com Mar 1 '11 at 12:19

This question came from our site for professional and enthusiast programmers.

It would help is you further explain the situation. Do yo mean protecting an existing spreadsheet from change? –  surfasb Mar 1 '11 at 12:33
add comment

2 Answers

As in change it so it is read only, you mean? You can do that with a password if I'm not mistaken.

But disallow saving - I don't see the point - someone could always copy the file.

share|improve this answer
add comment

You could have a macro on the Before_Save event, but circumventing it only means disabling macros.

       ThisWorkbook.Close savechanges:=False

If you forced macros to be enabled to even view the content that might help, but won't ensure not saving. Chip Pearson's site has some interesting TimeBombRegistry code you might adapt

share|improve this answer
add comment

Your Answer

