11/1/2023 0 Comments How to put a password on a folderSet FSO = CreateObject("Scripting.FileSystemObject")įolderPath = "C:\Users\WYMAN\Desktop\excelfolder" Public Sub addPassword()ĭim folder As Object, subfolder As Object The below Procedure adds password “yourpassword” to all Excel under folder C:\Users\WYMAN\Desktop\excelfolder and all subfolders one level down. If you fail to run FSO Object, open VBE (ALT+F11) > Tools > References > Check the box Microsoft Scripting RuntineĮxcel VBA – Add password to all Excel workbook in folder You should be able to run FSO in Excel 2013. I will base on these two posts to write the Macro. I have also written a post that explains how to loop through folders and subfolders.Įxcel loop workbooks in folders and subfolders with FSO Previously I have written another post that demonstrates how to add password to Excel using VBA. This tutorial demonstrates how to add password to all workbooks in a specified folder. If you have a lot of workbooks to add password, it is definitely a waste of time. In many organizations, employees are required to add password to Excel before sending workbooks through email, or before putting workbooks in network drive. Protect VBA code with password Add password to all Excel workbook in folder This Excel VBA tutorial explains how to add password to all Excel workbook in folder and how to mass remove password.Įxcel VBA protect worksheet with passwordĮxcel VBA hide worksheet with password (xlVeryHidden)
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |