How To Disable Workbook Save But Only Allow Save As In Excel?


Excel is a powerful tool for managing and analysing data, and sometimes you may want to restrict users from saving changes to a particular workbook to maintain data integrity or prevent accidental modifications. However, you might still want to allow users to create copies of the workbook using the "Save As" feature for their own use or further analysis.

In this tutorial, we will explore different methods to achieve this goal in Excel. We will cover both manual techniques and VBA (Visual Basic for Applications) solutions to disable workbook saving and restrict users to the "Save As" option only. Whether you are a beginner or an advanced Excel user, this tutorial will provide you with step−by−step instructions and examples to help you implement this functionality in your workbooks. By the end of this tutorial, you will have a clear understanding of the various approaches available and be able to choose the method that best suits your specific needs. So, let's get started and learn how to disable workbook save but only allow "Save As" in Excel!

Disable Workbook Save But Only Allow Save As

Here we will first add the VBA code to the whole workbook, then save the sheet to complete the task. So let us see a simple process to know how you can disable workbook save but only allow save as in Excel.

Step 1

Consider any Excel sheet. First, right−click on the sheet name and select "View Code" to open a VBA application. Then, double−click on this workbook and copy the below code into the text box, similar to the below image.

Code

Private Sub Workbook_BeforeSave(ByVal SaveAsUI As Boolean, Cancel As Boolean)
   If Not SaveAsUI Then
      Cancel = True
      MsgBox "You cannot save this workbook. Use Save As", vbInformation, "Disable workbook savel"
   End If
End Sub

Step 2

Then close the VBA application using the command Alt + Q. From now on, when we try to directly save the sheet, it will return an error.

Conclusion

In this tutorial, we have used a simple example to demonstrate how you can disable workbook save but only allow save as in Excel to highlight a particular set of data.

Updated on: 11-Jul-2023

411 Views

Kickstart Your Career

Get certified by completing the course

Get Started
Advertisements