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

Tags: , ,

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: 43
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
Macarenas's Avatar
Member
 
Join Date: May 2008
Posts: 3,082
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
chroma's Avatar
Member
 
Join Date: Apr 2008
Posts: 1,673
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
Raine's Avatar
Member
 
Join Date: May 2008
Posts: 2,076
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


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
How To Disable Voice Command Feature permanently in iPhone 3GS? Linoo Portable Devices 3 02-12-2009 03:22 PM
How can i disable the Reopen Last Browsing Session Feature in IE8 Bartholomew Technology & Internet 4 10-07-2009 08:05 PM
Disable text messaging feature on Verizon DwinHell Portable Devices 2 16-06-2009 10:54 PM
How to disable automatic restart feature after Windows Vista update matthewforu Operating Systems 2 29-08-2008 01:42 PM
touchpad/mousepad /ps2 disable feature disabled/greyed-out in vista Vince M Vista Help 0 27-02-2008 02:45 AM


All times are GMT +5.5. The time now is 01:53 AM.