Results 1 to 4 of 4

Thread: How to disable SaveAs feature in Excel ?

  1. #1
    Join Date
    Feb 2009
    Posts
    63

    How to disable SaveAs feature in Excel ?

    hie,

    We have many Excel files to work with in our office. I have adviced my colleges to edit the required data in these excel files and not to modify the name of the file. But after modifying, some colleges modify the name of the files as per their choice. I want to disable the Save As feature in Microsoft Excel. How can i do that ? any ideas....

  2. #2
    Join Date
    May 2008
    Posts
    4,831

    Re: How to disable SaveAs feature in Excel ?

    For Excel 2003,

    After you press ALT+F11, put the following VBA code in "Workbook" object

    Private Sub Workbook_Open()
    disablesaveas
    End Sub


    Then Add "Module" and paste this in
    Sub disblesaveas()
    CommandBars("File").Controls("Save As...").Enabled = False
    End Sub


    Then close the file and open it again

    For Excel 2007 users,

    Private Sub Workbook_BeforeSave(ByVal SaveAsUI As Boolean, Cancel As Boolean)
    If SaveAsUI Then Cancel = True
    End Sub

  3. #3
    Join Date
    Apr 2008
    Posts
    2,139

    Re: How to disable SaveAs feature in Excel ?

    Use the following macro code mentioned below. This macro will disable the Save As option in Excel. This macro prevents Saving under a different name or in a different location.

    Code:
    Private Sub Workbook_BeforeSave _
    
    'This macro disables the "Save As" Feature in Excel
    'This means that a user will not be able to save this
    'workbook(file) under a different name or in a different location
    '
    'This MUST be placed in "ThisWorkbook" and NOT in a Module.
    '
    (ByVal SaveAsUI As Boolean, Cancel As Boolean)
        If SaveAsUI = True Then Cancel = True
    
    End Sub

    To use this Macro -
    • Press Alt + F11 - to open the Visual Basic Window
    • Locate the open excel file in the left pane of the window and double click "ThisWorkbook."
    • Paste this code In the window that opens.
    • Save and close the Visual Basic Window.


    Note -
    This macro runs in "ThisWorkbook" and not in a Module.

    Putting the code there instead of inside a module is what will allow this code to run automatically before excel saves or closes.

  4. #4
    Join Date
    May 2008
    Posts
    3,316

    Re: How to disable SaveAs feature in Excel ?

    Here's a useful code. I use this code for myself on several workbooks.
    Note - this code must be placed in the ThisWorkbook object.

    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

Similar Threads

  1. Password saving feature disable in firefox 11
    By Chang@IT in forum Technology & Internet
    Replies: 3
    Last Post: 25-04-2012, 11:21 PM
  2. How to disable excel for taking empty cell in Excel chart
    By Hache hi in forum MS Office Support
    Replies: 2
    Last Post: 25-02-2012, 12:30 PM
  3. Samsung disable the cinema smooth feature
    By DexterO in forum Monitor & Video Cards
    Replies: 5
    Last Post: 05-01-2012, 10:32 AM
  4. How can I Disable Lion's 'Resume' Feature?
    By Wyl in forum Hardware Peripherals
    Replies: 4
    Last Post: 09-08-2011, 09:49 AM
  5. How can i disable the Reopen Last Browsing Session Feature in IE8
    By Bartholomew in forum Technology & Internet
    Replies: 4
    Last Post: 10-07-2009, 08:05 PM

Tags for this Thread

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
Page generated in 1,711,725,817.66673 seconds with 17 queries