I have searched many forums and have tried many things that I have found but am having no luck. I know that it will likely be something very simple but I cannot figure it out. Would someone please help me 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'. Everything else in my coding works perfectly, would someone please help me? I have cross-posted this to ExcelForum here: https://www.excelforum.com/excel-pro...ml#post5876178
Code:For r = FirstRow To sws.Cells(sws.Rows.Count, "A").End(xlUp).Row sws.Rows(r).Copy dfCell dName = CStr(sws.Cells(r, "A").Value) & NAME_DELIMITER _ & CStr(sws.Cells(r, "B").Value) If Len(dName) > ndLen Then dws.Name = dName dFilePath = dFolderPath & dName & ".xlsx" Application.DisplayAlerts = False dwb.SaveAs dFilePath, xlOpenXMLWorkbook Application.DisplayAlerts = True dCount = dCount + 1 End If
Thank you so much for your assistance!! I appreciate any help you can offer.


Reply With Quote

Bookmarks