Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.excel.programming
|
|||
|
|||
VBA - Protecting from Save
Is there a code to write that will allow users of the file
to only SAVE AS, and not SAVE? Please help, I'm having trouble preventing people from using SAVE on template forms I built, and therefore their info. is there every time I open the files. Thank you very much! |
#2
Posted to microsoft.public.excel.programming
|
|||
|
|||
VBA - Protecting from Save
In the ThisWorkbook Class Module:
Private Sub Workbook_BeforeSave(ByVal SaveAsUI As Boolean, Cancel As Boolean) If SaveAsUI = False Then Cancel = True End Sub Regards Trevor "HRobertson" wrote in message ... Is there a code to write that will allow users of the file to only SAVE AS, and not SAVE? Please help, I'm having trouble preventing people from using SAVE on template forms I built, and therefore their info. is there every time I open the files. Thank you very much! |
#3
Posted to microsoft.public.excel.programming
|
|||
|
|||
VBA - Protecting from Save
Put in a workbook_Open event that prompts for a file name and saves the
file. Private Sub Workbook_Open() Dim fname as String if ThisWorkbook.Name = "TemplateName.xls" then fname = application.GetSaveAsFilename() if fname = "false" then fname = "TemplateName" & format(date,"yyyymmdd_hhmm") _ & ".xls" Thisworkbook.SaveAs fname End if End Sub -- Regards, Tom Ogilvy "HRobertson" wrote in message ... Is there a code to write that will allow users of the file to only SAVE AS, and not SAVE? Please help, I'm having trouble preventing people from using SAVE on template forms I built, and therefore their info. is there every time I open the files. Thank you very much! |
#4
Posted to microsoft.public.excel.programming
|
|||
|
|||
VBA - Protecting from Save
Another approach would be mark the template as Read-Only using Windows
explorer, right clicking on the file and selecting options. -- Regards, Tom Ogilvy "HRobertson" wrote in message ... Is there a code to write that will allow users of the file to only SAVE AS, and not SAVE? Please help, I'm having trouble preventing people from using SAVE on template forms I built, and therefore their info. is there every time I open the files. Thank you very much! |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
protecting formulas without protecting sheet so grouping still wor | Excel Discussion (Misc queries) | |||
Save, save as, page setup dimmed out in unprotected excel sheet? | Excel Discussion (Misc queries) | |||
SAVE and SAVE AS options disappeared from the drop down FILE menu | Excel Discussion (Misc queries) | |||
Save As and save current numbers not the actual formulas and links | Excel Discussion (Misc queries) | |||
Command Button Save As Application.ExecuteExcel4Macro ("SAVE.AS?() | Excel Discussion (Misc queries) |