Forum Discussion
Force user to SAVEAS
- Aug 06, 2018
Hi Man Fai Chan
Good to hear you have some ideas to go forward with.
Out of curiousity, is your network file saved as an Excel Macro-enabled template (*.xltm)?
Cheers
Damien
Hi Man Fai Chan
If the shared folder is on SharePoint or OneDrive, you can choose to give READ only access to the template file.
This will stop people from editing the original template but they can still get access to a copy (template) of the file to use as required.
If you need to set the permissions to do that. Find the file on OneDrive or SharePoint online, you can click Share and configure the settings, or view the details of the file and change the file permissions.
If your file is stored locally on a file drive, then you can right click onto the file > Properties > Security tab to change file permissions.
Hope that helps.
Cheers
Damien
- Lorenzo KimAug 03, 2018Bronze Contributor
It might be a forum violation - so I am making my own conversation....
topic = SAVEAS
thank you
- Man Fai ChanAug 03, 2018Iron Contributor
Thanks Kim's and Rosario's reply.
The file is saved in a networked drive, so that I cannot use the ONE DRIVE/SHAREPOINT. The file is a form for others to complete and then submit to the person-in-charge. I actually made macro to check if they completed the form or not.
Thanks for you two to inspire me the following code:
Private Sub Workbook_BeforeSave(ByVal SaveAsUI As Boolean, Cancel As Boolean)
If SaveAsUI Then
Else
If ThisWorkbook.Name = "Template.xlsb" Then
x = InputBox("This is the template file, you need password to save")
If x <> "CORRECTPASSWORD" Then
Cancel = True
Else
Cancel = False
End If
Else
Cancel = fasle
End If
End If
End SubThe use of "CORRECTPASSWORD" is actually a way for me (as the writer) to save file. However, I found that the user can still SAVEAS the template file and overwrite it in the save-window.
- Damien_RosarioAug 06, 2018Silver Contributor
Hi Man Fai Chan
Good to hear you have some ideas to go forward with.
Out of curiousity, is your network file saved as an Excel Macro-enabled template (*.xltm)?
Cheers
Damien