98.7% Of all customers recommend us, we're so confident about our results we publish all reviews and stats
View Live Stats View ReviewsForum home » Delegate support and help forum » Microsoft Excel Training and help » Excel saving of files
Excel saving of files
Resolved · Low Priority · Version 2007
Jon has attended:
Excel Intermediate course
Excel Intermediate course
Excel Advanced course
Excel Advanced course
Excel VBA Intro Intermediate course
Excel saving of files
I wish to prevent someone from saving a file, how can I do that without windows rights management
RE: excel saving of files
Hi Jon,
Thank you for your question and welcome to the forum.
The following VBA code will disable the Save As feature when Office button Save As is used or the keyboard shortcut Function key F12:
Private Sub Workbook_BeforeSave(ByVal SaveAsUI As Boolean, Cancel As Boolean)
If SaveAsUI Then
MsgBox "The 'Save As' function has been disabled." & Chr(10) & "Only 'Save' will work.", vbInformation, "Save As Disabled"
Cancel = True
End If
End Sub
You need to copy the code above into the VBA window and paste it into the Workbook before save event. Please use the link below to try this procedure:
1. Copy the Excel VBA code in this response from Private Sub to End Sub.
2. Select the workbook in which you want to store the code.
3.Hold the Alt key, and press the F11 key, to open the Visual Basic Editor.
4. In the Project Explorer, find your workbook, and open the list of Microsoft Excel Objects.
5. Right-click or double click on the ThisWorkbook object, and choose View Code.
6. Where the cursor is flashing, choose Edit | Paste
Everytime someone tries to use the Save As command or F12 it will not allow it and displays a message box to display a message saying only Save is allowed.
I hope this helps and makes sense.
Regards
Simon
Thu 1 Dec 2011: Automatically marked as resolved.
Training information:
See also:
Welcome. Please choose your application (eg. Excel) and then post your question. Our Microsoft Qualified trainers will then respond within 24 hours (working days). Frequently Asked Questions
Any suggestions, questions or comments? Please post in the Improve the forum thread. |
Excel tip:Create Equations in Excel 2010Here's how to create basic mathematical |