Hi All,
I have created a macro that, in the end, saves the file using the following code:
This code usually works for saving the file, but we recently had a requirement to make the resulting files undeletable by non-administrators. However, if the administrator denies permissions for the network folder that the files reside in, the Save As code above fails. It looks like the data becomes trapped in a temp file that cannot be deleted under low permission settings. The excel file does save, but it has a size of 0 bytes.
Is there a way to either:
Thanks!
Will
I have created a macro that, in the end, saves the file using the following code:
PHP:
ActiveWorkbook.SaveAs Filename:=oneback & "\" & deptname & "_QT Report_" _
& reportdateQ & ".xlsx", FileFormat:=xlOpenXMLWorkbook, CreateBackup:=False
Is there a way to either:
- Configure the Save As code so that it succeeds with minimal permissions?
- Automatically (with VBA) set permissions on each resulting file after it is saved so that the file cannot be deleted?
- Set the security permissions such that the macro can successfully save the file and the resulting file cannot be deleted by non-administrators.
Thanks!
Will