Closed Thread
Results 1 to 14 of 14

Updating Links from Password Protected Sources

  1. #1
    Registered User
    Join Date
    09-13-2017
    Location
    United States
    MS-Off Ver
    MS Office 365
    Posts
    43

    Updating Links from Password Protected Sources

    I created 2 Password Protected Excel Workbooks and 1 Master Excel Workbook. The Master Excel Workbook are linked to the 2 Password Protected Excel Workbooks to get the data from them. Whenever I open the Master Excel Workbook, there will be a prompt asking do I want to update or not and I click "Update Link," but another prompt will follow asking for a password. The password prompt will reoccur every time I open the Master Excel Workbook. I was hoping to find a way to have the Master Excel Workbook contain the two passwords, so the next time I open the Master Excel Workbook, I won't have to type in the password.

    I created a new module in Visual Basic and have tried this code but it doesn't seem to work:
    Formula: copy to clipboard
    Please Login or Register  to view this content.


    Thank you very much for any help provided. I have been googling and trying to figure out different method but the password prompt still shows up.

  2. #2
    Forum Expert
    Join Date
    11-22-2016
    Location
    Cornwall,UK
    MS-Off Ver
    office 365
    Posts
    4,240

    Re: Updating Links from Password Protected Sources

    workbooks can be saved with 2 passwords - open & modify
    and would return the problem you are describing if you only supply one password in VBA

    Which one did you use?
    Or did you use both?
    You may have used the same password for both Open and Modify


    Please Login or Register  to view this content.
    Please Login or Register  to view this content.
    Please Login or Register  to view this content.
    Last edited by kev_; 09-15-2017 at 09:49 AM.
    Click *Add Reputation to thank those who helped you. Ask if anything is not clear

  3. #3
    Registered User
    Join Date
    09-13-2017
    Location
    United States
    MS-Off Ver
    MS Office 365
    Posts
    43

    Re: Updating Links from Password Protected Sources

    Hi kev_°

    Sorry, I might not have explained it clearly. The two password protected excel files are encrypted with a password, protecting the entire workbook. The sheets are protected but I have certain cells that users are allowed to add values in. So, I want to write a VBA code that when you open the Master Excel Workbook, it will still prompt to ask the user if he/she wants to update but automatically insert password to password prompt.

    Also, I tried the open only code, but I still get a password prompt.

    Thank you so much for answering this post.

  4. #4
    Forum Expert
    Join Date
    11-22-2016
    Location
    Cornwall,UK
    MS-Off Ver
    office 365
    Posts
    4,240

    Re: Updating Links from Password Protected Sources

    This way worked for me
    (Amend path and password to match your own, and repeat for each file)

    1. Disable automatic update of links
    HOW?
    On Data Tab
    \ Edit Links \ Startup Prompt \ Don't Display Alert and don't update automatic links

    2. Use VBA to ask user whether to update links or not
    this code goes in ThisWorkbook module of the Master workbook:
    Please Login or Register  to view this content.
    Last edited by kev_; 09-16-2017 at 05:52 AM.

  5. #5
    Forum Expert
    Join Date
    11-22-2016
    Location
    Cornwall,UK
    MS-Off Ver
    office 365
    Posts
    4,240

    Re: Updating Links from Password Protected Sources

    OR
    instead of the 2 steps in post#4, handle everything in a single macro (in ThisWorkbook module of the Master workbook):
    Please Login or Register  to view this content.
    Last edited by kev_; 09-16-2017 at 05:53 AM.

  6. #6
    Registered User
    Join Date
    09-13-2017
    Location
    United States
    MS-Off Ver
    MS Office 365
    Posts
    43

    Re: Updating Links from Password Protected Sources

    Hi kev_°,

    Thank you for the quick response and thank you so much for your codes! I used the code in post #5 and after some tweaking it worked. There was something strange about this. When I copy and paste the code from post #5 into ThisWorkBook module and saved it and reopen the workbook; I still get an Excel prompt asking if I want to update it or not and when I click don't update, then the vba update would appear. So, I used step 1 from Post #4 to turn it off but for some reason it was already ticked on "Don't display the alert and don't update automatic links." I clicked it again and saved the workbook. Once I open again, it was working smoothly. I remember having the option to allow the user to choose whether to update or not, so I assume that this part of the code in post #5 is not working:
    Please Login or Register  to view this content.
    I am curious why this didn't work but thank you again for your codes.

    Thank you again for your help!

  7. #7
    Forum Expert
    Join Date
    11-22-2016
    Location
    Cornwall,UK
    MS-Off Ver
    office 365
    Posts
    4,240

    Re: Updating Links from Password Protected Sources

    You are welcome
    You are probably correct about the settings - the code would conflict with existing file settings.
    It worked for me with the settings I had set up, so the problem did not arise on my PC

    If you have a solution, please mark thread SOLVED (Thread Tools at top of thread)
    Thanks

  8. #8
    Registered User
    Join Date
    09-13-2017
    Location
    United States
    MS-Off Ver
    MS Office 365
    Posts
    43

    Re: Updating Links from Password Protected Sources

    Hi kev_°,

    Thanks for everything. I have a question about the update process. When I click yes for the vba update prompt, it will briefly open the document and close the document, and will repeat this for the number of files I have added in the vba code you provided. Is it possible to skip the part where it shows the document is opening and closing?

  9. #9
    Forum Expert
    Join Date
    11-22-2016
    Location
    Cornwall,UK
    MS-Off Ver
    office 365
    Posts
    4,240

    Re: Updating Links from Password Protected Sources

    Try this:
    Please Login or Register  to view this content.

  10. #10
    Registered User
    Join Date
    09-13-2017
    Location
    United States
    MS-Off Ver
    MS Office 365
    Posts
    43

    Re: Updating Links from Password Protected Sources

    Thank you so much kev_°!! Everything is working beautifully.

  11. #11
    Registered User
    Join Date
    12-02-2019
    Location
    Canada
    MS-Off Ver
    Office 365
    Posts
    9

    Re: Updating Links from Password Protected Sources

    Hello, can you please tell me how you tweaked this so I can use the code, its not working for me it keeps prompting me to select UpdateLinks

  12. #12
    Forum Expert Pepe Le Mokko's Avatar
    Join Date
    05-14-2009
    Location
    Belgium
    MS-Off Ver
    O365 v 2402
    Posts
    13,446

    Re: Updating Links from Password Protected Sources

    Administrative Note:

    Welcome to the forum.

    We are happy to help, however whilst you feel your request is similar to this thread, experience has shown that things soon get confusing when answers refer to particular cells/ranges/sheets which are unique to your post and not relevant to the original.

    Please see Forum Rule #4 about hijacking and start a new thread for your query.

    If you are not familiar with how to start a new thread see the FAQ: How to start a new thread

  13. #13
    Registered User
    Join Date
    12-14-2021
    Location
    Zambales, Philippines
    MS-Off Ver
    MS 2013
    Posts
    1

    Re: Updating Links from Password Protected Sources

    Hi, thank you so much for these codes. But I have question.
    These 2 protected worksheets are currently open to another users, when I open the Master Excel it requires again to enter the passwords of these worksheets. Is there anyway that I can update the Master file without entering their password?

  14. #14
    Forum Moderator AliGW's Avatar
    Join Date
    08-10-2013
    Location
    Retired in Ipswich, Suffolk, but grew up in Sawley, Derbyshire (England)
    MS-Off Ver
    MS 365 Subscription Insider Beta Channel v. 2404 (Windows 11 22H2 64-bit)
    Posts
    80,720

    Re: Updating Links from Password Protected Sources

    Administrative Note:

    Welcome to the forum.

    We are happy to help, however whilst you feel your request is similar to this thread, experience has shown that things soon get confusing when answers refer to particular cells/ranges/sheets which are unique to your post and not relevant to the original.

    Please see Forum Rule #4 about hijacking and start a new thread for your query.

    If you are not familiar with how to start a new thread see the FAQ: How to start a new thread
    Ali


    Enthusiastic self-taught user of MS Excel who's always learning!
    Don't forget to say "thank you" in your thread to anyone who has offered you help.
    You can reward them by clicking on * Add Reputation below their user name on the left, if you wish.

    Forum Rules (updated August 2023): please read them here.

Closed Thread

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Similar Threads

  1. Excel prompts password when updating link sources
    By goranimo in forum Excel Programming / VBA / Macros
    Replies: 3
    Last Post: 02-04-2016, 01:38 PM
  2. Maintain links between password protected workbooks
    By AHuntDIA in forum Excel General
    Replies: 0
    Last Post: 04-24-2014, 01:08 PM
  3. Updating Links from Password protected Workbooks
    By rhysaubs in forum Excel Programming / VBA / Macros
    Replies: 11
    Last Post: 05-06-2010, 10:24 AM
  4. Excel Crashes when updating links to external data sources
    By cooper1308 in forum Excel General
    Replies: 1
    Last Post: 08-26-2009, 01:44 AM
  5. Replies: 0
    Last Post: 04-06-2009, 09:42 PM
  6. Problems updating links on protected sheets
    By Gandalf123 in forum Excel General
    Replies: 0
    Last Post: 01-06-2009, 06:50 AM
  7. Links to password protected workbooks
    By Nesta777 in forum Excel General
    Replies: 1
    Last Post: 07-19-2006, 07:40 AM

Tags for this Thread

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts

Search Engine Friendly URLs by vBSEO 3.6.0 RC 1