Go Back   TechArena Community > Software > Windows Software
Become a Member!
Forgot your username/password?
Tags Active Topics RSS Search Mark Forums Read

Sponsored Links



How to disable SaveAs feature in Excel ?

Windows Software


Reply
 
Thread Tools Search this Thread
  #1  
Old 30-04-2009
Member
 
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....

Reply With Quote
  #2  
Old 30-04-2009
Member
 
Join Date: May 2008
Posts: 4,829
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
Reply With Quote
  #3  
Old 30-04-2009
Member
 
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.
Reply With Quote
  #4  
Old 30-04-2009
Member
 
Join Date: May 2008
Posts: 3,313
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
Reply With Quote
Reply

  TechArena Community > Software > Windows Software
Tags: , ,



Thread Tools Search this Thread
Search this Thread:

Advanced Search


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


All times are GMT +5.5. The time now is 09:51 PM.