+ Reply to Thread
Results 1 to 11 of 11

Need macro to disable "Save" and "Save as" buttons

Hybrid View

  1. #1
    Valued Forum Contributor WasWodge's Avatar
    Join Date
    08-02-2010
    Location
    Hampshire,England
    MS-Off Ver
    Office 365 and Office 2010
    Posts
    882

    Re: Need macro to disable "Save" and "Save as" buttons

    Anforya, it is not disabling the buttons but the code below should prevent a save. Place the code in the ThisWorkbook module

    Private Sub Workbook_BeforeSave(ByVal SaveAsUI As Boolean, Cancel As Boolean)
    If SaveAsUI then Cancel = True
    End Sub
    To allow you to save, in the code window press CTRL + G to open the Immediate Window, type

    Application.EnableEvents=False
    and press Enter.

    To re-enable events
    Application.EnableEvents=True

    Obviously this won't work if they don't enable the macros.
    Last edited by WasWodge; 09-01-2012 at 12:50 PM.
    If my solution worked (or not) please let me know. If your question is answered then please remember to mark it solved

    Computers are like air conditioners. They work fine until you start opening windows. ~Author Unknown

+ Reply to Thread

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

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

Search Engine Friendly URLs by vBSEO 3.6.0 RC 1