Some notes in support of this main question from the web https://www.excelforum.com/excel-pro...-password.html , ( for Alan )
Original PM request..
Is it possible for you to help me understand how to make the files created with this code be protected so others cannot make any changes? If it is with a password, that would be optimal, I just don't want any error messages telling the user that a password will allow them to make changes if possible. If that makes sense.
Shortly later Request from here https://www.excelforum.com/excel-pro...ml#post5876012
adjust the following code, to save the files that are being created as protected files (may be opened and viewed but not edited)? If a message is necessary if someone tries to change values, I would want the message to say only 'changes cannot be made without the appropriate password'.
The thing required in the first request I suggested could be a bit difficult. The second looks initially as if it could be straight forward and conventional
Forum Sample.xlsm is the OPs original file from that thread
, and here is a snippit from his coding
Code:
dws.Name = dName
dFilePath = dFolderPath & dName & ".xlsx"
Application.DisplayAlerts = False
dwb.SaveAs dFilePath, xlOpenXMLWorkbook
Application.DisplayAlerts = True
Bookmarks