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

Reply
 
Thread Tools Search this Thread
  #1  
Old 05-11-2011
Member
 
Join Date: Nov 2011
Posts: 2
Disable "Save" and "Save As" functionality in all windows versions of excel

Hi our company has a file in which we would like to upload to sharepoint. We don't want the end user to be able to save or save as. I tried to do Alt F11 and put this code in "This Notebook" but some users were still able to save.

Private Sub Workbook_BeforeSave(ByVal SaveAsUI As Boolean, Cancel As Boolean)

If SaveAsUI Then

Cancel = True

MsgBox "SaveAs is Disabled", vbOKOnly

End If

End Sub


The users will have 2003, 2007 or 2010 Excel.

How do we get around the people who do not have macros enabled?

Thank you,
T
Reply With Quote
  #2  
Old 05-11-2011
Member
 
Join Date: Dec 2007
Posts: 2,273
Re: Disable "Save" and "Save As" functionality in all windows versions of excel

The below macro will disable the Save As feature in excel. This means that a user will not be able to resave the workbook under a different name or even in a different location. The only option for saving is to click "Save" which will only save any changes made to the current document.

Code:
Private Sub Workbook_BeforeSave (ByVal SaveAsUI As Boolean, Cancel As Boolean)

'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.
'

    If SaveAsUI = True Then Cancel = True

End Sub
Reply With Quote
  #3  
Old 05-11-2011
Member
 
Join Date: Nov 2011
Posts: 2
Re: Disable "Save" and "Save As" functionality in all windows versions of excel

Thanks Einstein, what happens if a user doesnt have their macros enabled?

Thanks!

T
Reply With Quote
  #4  
Old 04-03-2012
Member
 
Join Date: Feb 2012
Posts: 1
Re: Disable "Save" and "Save As" functionality in all windows versions of excel

Hi.

I have disabled the SaveAs function in an Excel 2007 protected workbook. This is working well. (Thank you all for helping with the code.)

How do I now disable the automatic Microsoft Office Excel message box reminder to save changes? This is unnecessary and confusing since users cannot save the workbook. AND I have programed a Message Box reminder when they try.
Reply With Quote
Reply

  TechArena Community > Software > Windows Software
Tags: , , , ,



Thread Tools Search this Thread
Search this Thread:

Advanced Search


Similar Threads for: "Disable "Save" and "Save As" functionality in all windows versions of excel"
Thread Thread Starter Forum Replies Last Post
windows 7: "save target as" option is not working Mishraji Operating Systems 10 03-01-2012 07:53 PM
<input type="button" value="Enregistrer" onclick="location.href=../asp/PRaces.asp"> Luz Software Development 6 18-05-2010 12:27 AM
"Open", "Save" or "Save As" dialog box default settings Damien25 Windows XP Support 6 04-09-2008 02:41 PM
Adding commands to "Folder Options/Edit File Type/Actions" grayed-out "Edit" & "Remove" Green_XP Windows XP Support 1 06-11-2007 02:18 PM
Project Web Access via IE7: "Export Grid to Excel" cause VBSCRIPT (error) message: "The activeX control on which this feature depends could not be created" Theo-Dore Microsoft Project 2 17-01-2007 09:47 PM


All times are GMT +5.5. The time now is 12:44 PM.