I Have created a user form that will open an excel file open & hide the excel. When closing the user form will save & close the excel file. However, there are two types
This checks the access list of the workbook's folder to see if the user's name appears in the list. If it does, then save the file.
If Instr(1, Environ("USERNAME"), CreateObject("WScript.Shell").Exec("CMD /C ICACLS """ & _
ThisWorkbook.Path & """").StdOut.ReadAll) > 0 Then ThisWorkbook.Save
It does this by opening a command prompt, running the ICACLS command through it and reading the output from that command. Then it uses the InStr() method to see if the username appears in that output.