I am trying to use a macro to consolidate data from protected workbooks. Note: It appears PowerQuery doesn't like password-protected files.
Below is the vba I have used to open unprotected files in the past. How do I modify the script to provide the required password.
Below is the vba I have used to open unprotected files in the past. How do I modify the script to provide the required password.
Code:
[/COLOR]Workbooks.Open Filename:=GetMasterDataInputPath & "\" & Filename[COLOR=#574123][CODE][/COLOR]
I tried to add the password object but, it appears I need and end statement.
[COLOR=#574123][CODE][/COLOR]Workbooks.Open Filename:=GetMasterDataInputPath & "\" & Filename _Password:=PSWD[COLOR=#574123][CODE][/COLOR]
[COLOR=#ff0000][B]Your suggestions/solutions are greatly appreciated![/B][/COLOR]