+ Reply to Thread
Results 1 to 3 of 3

VBA code for deactivating Save As feature

Hybrid View

  1. #1
    Forum Contributor
    Join Date
    05-03-2013
    Location
    Costa Rica
    MS-Off Ver
    MS Excel 365
    Posts
    141

    VBA code for deactivating Save As feature

    hi there! Is it possible to deactivate the Save As feature so that anyone could not change my Excel 2003 files once they get'em?

  2. #2
    Forum Expert Tinbendr's Avatar
    Join Date
    06-26-2012
    Location
    USA
    MS-Off Ver
    Office 2010
    Posts
    2,138

    Re: VBA code for deactivating Save As feature

    In the ThisWorkbook module:
    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
    David
    (*) Reputation points appreciated.

  3. #3
    Forum Contributor
    Join Date
    05-03-2013
    Location
    Costa Rica
    MS-Off Ver
    MS Excel 365
    Posts
    141

    Re: VBA code for deactivating Save As feature

    Hi Tinbendr!

    Thanks for your reply. However, now that I think it through, I guess that what I should have said was: is there a VBA code to disable or deactivate both the Save and Save As features in Excel 2003? The Save As feature is needed when you want to make a copy of an existing, previously saved worksheet using a different name. The Save feature is used to continue saving an existing, previously saved workbook as more changes are applied to it. What I intend is to hinder users/viewers from altering my files or making copies of them if I send my files on an email. Then, I would need another code for restoring both features to normality. Do you think this is possible to do with VBA?

+ Reply to Thread

Thread Information

Users Browsing this Thread

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

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

Search Engine Friendly URLs by vBSEO 3.6.0 RC 1