Disable Save As in Excel

Disable Save As Function

 
Sometimes you wish to send a copy of your unfinished Excel spreadsheet only for review or for other reasons, it is logical to turn off some of its features. In this tutorial we will try to explain how to do disable the 'Save As' function of Excel using Visual Basic Applications (VBA).
Excel Disable Save As
 

How is it done
The first step is to access the Visual Basic window via Developer > Visual Basic. A new window will come out and then double click "ThisWindow" in the project browser, this will bring a blank white page at the right side where we can paste the VBA code.
 
Excel Developer Menu
 
Excel Disable Save As 2
 

VBA Code
Copy and paste the following code in the blank page of the VBA window.
The message can be customized as the way you like it. The code uses the built-in syntax "ByVal SaveAsUI" to call a command when the 'Save As' function were called.
 
Private Sub Workbook_BeforeSave(ByVal SaveAsUI As Boolean, Cancel As Boolean)

If SaveAsUI Then
MsgBox "The 'Save As' function has been disabled." & _
Chr(10) & "For Review Purpose Only", vbInformation, "Save As Disabled"
Cancel = True
End If

End Sub
 
Excel Disable Save As 3
 
 
Show Comments
 

About Us

Excelcrib was founded in November 2017 by Garry, a Microsoft® Office Excel® (MS Excel) enthusiast with background in engineering. He's been using MS Excel for more than 15 years in practice with specialty in VBA.

© Copyright 2021 Excelcrib | Privacy Policy

We use cookies to improve your browsing experience.
Continuing to use this site means you agree to our use of cookies.
Tell me more!