Solved VBA - Code for entering password more than once for links

November 3, 2018 at 03:56:18
Specs: Windows 7
Hi there, I am reading this thread and its very useful. I have an issue where I have one document which links to multiple protected Work books, When I open the master it is asking me to enter the password in manually for each link protected document. Like the code you explained above it only enters the password for one link document, in this case I have three, so I have to manually enter the passwords for the other too. Is there some sort of loop or password repeat code I can do?

Here's my code:

Sub Button1_Click()
' Button1_Click Macro

ChDir "U:\WIP\Stuff"
Workbooks.Open Filename:="U:\WIP\Stuff\MASTER BOOK.xlsx", UpdateLinks:=3, Password:="0dear"
End Sub

Hope someone can help//

Thank you.


See More: VBA - Code for entering password more than once for links

Report •

November 5, 2018 at 07:47:19
✔ Best Answer
First, I should mention that nothing in your post tells us what "thread" you are referring to. When you say "Like the code you explained above..." we don't know what code you are talking about. If you want us to look at another thread, you'll need to include a link to that thread in your post. (In this case, I don't know if we need it, since it doesn't solve your current issue.)

That said, I found a similar question via Google and a possible solution. I have not tested the suggestion, I'll leave that to you. The bottom line appears to be that you need to actually open the files within your code (using the Password:="xxxr" line) before the links are updated. If the files are open when the links try to update, then Excel won't ask for a password.

See the last post at the following link. Granted, there is no response from the OP that says "It worked!" but the concept seems to make sense. Give it a try and let us know if it works for you.

message edited by DerbyDad03

Report •
Related Solutions

Ask Question