Results 1 to 4 of 4

Thread: Disable "Save" and "Save As" functionality in all windows versions of excel

  1. #1
    Join Date
    Nov 2011
    Posts
    2

    Disable "Save" and "Save As" functionality in all windows versions of excel

    Hi our company has a file in which we would like to upload to sharepoint. We don't want the end user to be able to save or save as. I tried to do Alt F11 and put this code in "This Notebook" but some users were still able to save.

    Private Sub Workbook_BeforeSave(ByVal SaveAsUI As Boolean, Cancel As Boolean)

    If SaveAsUI Then

    Cancel = True

    MsgBox "SaveAs is Disabled", vbOKOnly

    End If

    End Sub


    The users will have 2003, 2007 or 2010 Excel.

    How do we get around the people who do not have macros enabled?

    Thank you,
    T

  2. #2
    Join Date
    Dec 2007
    Posts
    2,291

    Re: Disable "Save" and "Save As" functionality in all windows versions of excel

    The below macro will disable the Save As feature in excel. This means that a user will not be able to resave the workbook under a different name or even in a different location. The only option for saving is to click "Save" which will only save any changes made to the current document.

    Code:
    Private Sub Workbook_BeforeSave (ByVal SaveAsUI As Boolean, Cancel As Boolean)
    
    '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.
    '
    
        If SaveAsUI = True Then Cancel = True
    
    End Sub

  3. #3
    Join Date
    Nov 2011
    Posts
    2

    Re: Disable "Save" and "Save As" functionality in all windows versions of excel

    Thanks Einstein, what happens if a user doesnt have their macros enabled?

    Thanks!

    T

  4. #4
    Join Date
    Feb 2012
    Posts
    1

    Re: Disable "Save" and "Save As" functionality in all windows versions of excel

    Hi.

    I have disabled the SaveAs function in an Excel 2007 protected workbook. This is working well. (Thank you all for helping with the code.)

    How do I now disable the automatic Microsoft Office Excel message box reminder to save changes? This is unnecessary and confusing since users cannot save the workbook. AND I have programed a Message Box reminder when they try.

Similar Threads

  1. windows 7: "save target as" option is not working
    By Mishraji in forum Operating Systems
    Replies: 10
    Last Post: 03-01-2012, 07:53 PM
  2. Replies: 6
    Last Post: 18-05-2010, 12:27 AM
  3. "Open", "Save" or "Save As" dialog box default settings
    By Damien25 in forum Windows XP Support
    Replies: 6
    Last Post: 04-09-2008, 02:41 PM
  4. Replies: 1
    Last Post: 06-11-2007, 02:18 PM
  5. Replies: 2
    Last Post: 17-01-2007, 09:47 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,710,832,557.86354 seconds with 17 queries