ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Programming (https://www.excelbanter.com/excel-programming/)
-   -   Overriding the menu "Save" option? (https://www.excelbanter.com/excel-programming/436733-overriding-menu-save-option.html)

Robert Crandal

Overriding the menu "Save" option?
 
If my users click "Save", I need to stop them from actually
saving any changes to my workbook. I want my workbook
to be unchangeable, and if someone clicks "Save", I want
to call a separate subroutine which will write data to a separate
file.

Can anyone provide any help on over-riding the "Save"
option and making my workbook unchangeable??

thank you



JE McGimpsey

Overriding the menu "Save" option?
 
One way:

Save your workbook as "Read Only" (Save As/Options/Read-only Recommended)

It's nearly impossible to make any solution foolproof, since fools are
so ingenious. You could use VBA to replace the Save command, but that
can be thwarted by opening with macros disabled. You can use VBA to make
it difficult to open the workbook without macros, but there's no
reliable way to prevent a reasonably savvy user from bypassing that.



In article ,
"Robert Crandal" wrote:

If my users click "Save", I need to stop them from actually
saving any changes to my workbook. I want my workbook
to be unchangeable, and if someone clicks "Save", I want
to call a separate subroutine which will write data to a separate
file.

Can anyone provide any help on over-riding the "Save"
option and making my workbook unchangeable??

thank you


Robert Crandal

Overriding the menu "Save" option?
 
I realize that no solution is foolproof.....

I am still interested in knowing about any of these ideas that are
foolproof. 8)

How can I intercept the menu "Save As" command?? Is the
solution related to the Workbook_BeforeSave() function???



"JE McGimpsey" wrote in message
...
One way:

Save your workbook as "Read Only" (Save As/Options/Read-only Recommended)

It's nearly impossible to make any solution foolproof, since fools are
so ingenious. You could use VBA to replace the Save command, but that
can be thwarted by opening with macros disabled. You can use VBA to make
it difficult to open the workbook without macros, but there's no
reliable way to prevent a reasonably savvy user from bypassing that.




Robert Crandal

Overriding the menu "Save" option?
 
Ooops, let me re-phrase that:

I am still interested in knowing about any of these ideas
that are NON-foolproof!

8)


"Robert Crandal" wrote in message
...
I realize that no solution is foolproof.....

I am still interested in knowing about any of these ideas that are
foolproof. 8)

How can I intercept the menu "Save As" command?? Is the
solution related to the Workbook_BeforeSave() function???




Tom Hutchins

Overriding the menu "Save" option?
 
I suggest you make the file read-only using Windows Explorer, instead of
saving it with read-only recommended. In Windows Explorer, right-click on the
(closed) workbook. Select Properties put a check in the 'read-only' box
OK. Unless your users reverse this procedure in Windows Explorer before
opening the workbook, they won't be able to save over it from Excel. Making
the file read-only also inhibits accidental deletion by requiring
confirmation first.

If you want to try Workbook_BeforeSave event code, it only needs to contain
the statement Cancel=True.

Hope this helps,

Hutch

"Robert Crandal" wrote:

Ooops, let me re-phrase that:

I am still interested in knowing about any of these ideas
that are NON-foolproof!

8)


"Robert Crandal" wrote in message
...
I realize that no solution is foolproof.....

I am still interested in knowing about any of these ideas that are
foolproof. 8)

How can I intercept the menu "Save As" command?? Is the
solution related to the Workbook_BeforeSave() function???



.



All times are GMT +1. The time now is 10:06 PM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
ExcelBanter.com