Hi
I just noticed this code, the author used
Sub UsePassword() Dim wkbOne As Workbook Set wkbOne = Application.Workbooks.Open("C:\Password.xls") wkbOne.Password = InputBox ("Enter Password") wkbOne.Close End Sub
https://docs.microsoft.com/en-us/office/vba/api/excel.workbook.password