Disable Save and Save as in Excel 07
I have entered several codes and cannot get this to work.
What I need to do is, write a code that will permanantly disable Save and Save As (from menu, shortcuts, etc) on this one workbook. The workbook consists of several formulas that my associates need to be able enter data and tally the answers yet, not be allowed to save anything they edit. This one workbook is used alot and by several people.
What i have done so far is enter this code(one of many that ive tried, yet this was the only one that remotely did anything)
Private Sub Workbook_BeforeSave(ByVal SaveAsUI As Boolean, Cancel As Boolean)
' Following line will prevent all saving
Cancel = True
' Following line will prevent the Save As Dialog box from showing
If SaveAsUI Then SaveAsUI = False
So this code worked until i exited out of the workbook and went back in. I made a change and clicked save and it saved.
How can i disable these to do what i need them to do?
Re: Disable Save and Save as in Excel 07
This was written in ExcelXP, but you should get an idea of what you need to do. Each control has a number assigned to it, and you would need to know that number to disable it.
Sub DisableMenuItems() With CommandBars("File") .Controls(4).Enabled = False 'Save Button .Controls(5).Enabled = False 'Save As Button .Controls(15).Enabled = False 'Print Button End With End Sub
|Tags: code, excel, excel 2007, microsoft excel, save as|
|Thread Tools||Search this Thread|
|Similar Threads for: "Disable Save and Save as in Excel 07"|
|Thread||Thread Starter||Forum||Replies||Last Post|
|Disable "Save" and "Save As" functionality in all windows versions of excel||bhithy||Windows Software||3||04-03-2012 01:53 AM|
|How to disable save a copy function in Excel||kelbel7795||Windows Software||2||18-07-2011 09:17 PM|
|How do you disable Save and Save As in MS Excel 2007||swb23||Tips & Tweaks||2||03-05-2011 05:05 PM|
|(Vista) Open/Save dialog boxes no longer appear so I cannot save files/images! Help?!||bry13||Windows Software||1||19-10-2010 08:36 AM|
|Save Images : Firefox Add-ons to Save All Pictures from Opened Tabs||Jackie||Tips & Tweaks||0||09-02-2009 07:36 PM|