For the VBA code to operate seamlessly, you will want to turn Display Alerts off before executing the code, then turning it back on after the file has been saved. If the file already exists a confirmation message will be displayed. ThisWorkbook.SaveAs Password:="fileOpenPassword", _ 'Save file with password required to open and modify the file ThisWorkbook.SaveAs writeResPassword:="modifyFilePassword" 'Save file to allow access, but requires password to modify ThisWorkbook.SaveAs Password:="fileOpenPassword" Save an Excel file with protection 'Save file with password required to open Workbook protection prevents users from adding, deleting, moving, hiding or unhiding worksheets.įile-level protection allows for two passwords: (1) to open the file (2) to modify the file. Worksheet protection controls what a user can or cannot do on a worksheet, such as inserting rows or typing into cells. Password protecting an Excel file achieves two main objectives (1) prevents unauthorized access to the Excel file (2) prevents unauthorized modification of the Excel file.įile-level protection is not the same as worksheet protection or workbook protection.
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |