Results 1 to 3 of 3

Excel Save option only through macro

Threaded View

  1. #1
    Registered User
    Join Date
    08-28-2012
    Location
    Bangalore
    MS-Off Ver
    Excel 2010
    Posts
    2

    Excel Save option only through macro

    Hi All,

    Im currently working on an excel file. i want to disable the save / Save As option in the file menu or buttons and allow saving only through a macro. Also the file should be saved only with a different name as i do not want my original file to be messed.

    I tried to below code to disable saveand it worked. But when i open the original file the below code s disappeared . !!!!

    Private Sub Workbook_BeforeSave(ByVal SaveAsUI As Boolean, Cancel As Boolean)
     
    If SaveAsUI = False Then
    Cancel = True
    MsgBox "You cannot save this workbook. Use Save As"
    End If
    
    End Sub


    Can anyone please help me out !! ...
    Thanks in Advance
    Last edited by arlu1201; 08-29-2012 at 04:30 AM.

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