Consulting

Results 1 to 4 of 4

Thread: Auto Updating Links

  1. #1
    VBAX Regular
    Joined
    May 2017
    Posts
    19
    Location

    Question Auto Updating Links

    Hi all.

    I'm properly missing out something completely obvious to why i can't seem to achieve this, so please guide me to the solution!

    Ok! so the basics; I'm running Excel 2013, I previously posted on here regarding pulling information from various other spreadsheets into a master, 20 in total and I was able to cobble something usable, but not perfect.

    My current issue is that some of the files that are being opened are prompting me to update links. To which i figured I just needed to add an updatelinks prompt after opening the particular file (see code below), however its spitting out a compile error and im not quite sure what im missing.

    PHP Code:
    Set wb1 ThisWorkbook
        Set wb2 
    Workbooks.Open("X:\089872 - IPW - Framework\02 Admin\01 DocRegisters\IPW-CAP-00-XX-RE-Z-0001.xlsx"UpdateLinks xlUpdateLinksAlways
    Thanks in advance

  2. #2
    VBAX Sage
    Joined
    Apr 2007
    Location
    United States
    Posts
    8,726
    Location
    Try this

    Set wb2 = Workbooks.Open("X:\089872 - IPW - Framework\02 Admin\01 DocRegisters\IPW-CAP-00-XX-RE-Z-0001.xlsx",  xlUpdateLinksAlways)

    In

    Set wb2 = Workbooks.Open("X:\089872 - IPW - Framework\02 Admin\01 DocRegisters\IPW-CAP-00-XX-RE-Z-0001.xlsx", UpdateLinks = xlUpdateLinksAlways)
    the UpdateLinks = xlUpdateLinksAlways part sort of looks like a 'Named Parameter' except that it should be UpdateLinks := xlUpdateLinksAlways with the colon

    Using it your way you shouldn't need it
    ---------------------------------------------------------------------------------------------------------------------

    Paul


    Remember: Tell us WHAT you want to do, not HOW you think you want to do it

    1. Use [CODE] ....[/CODE ] Tags for readability
    [CODE]PasteYourCodeHere[/CODE ] -- (or paste your code, select it, click [#] button)
    2. Upload an example
    Go Advanced / Attachments - Manage Attachments / Add Files / Select Files / Select the file(s) / Upload Files / Done
    3. Mark the thread as [Solved] when you have an answer
    Thread Tools (on the top right corner, above the first message)
    4. Read the Forum FAQ, especially the part about cross-posting in other forums
    http://www.vbaexpress.com/forum/faq...._new_faq_item3

  3. #3
    VBAX Regular
    Joined
    May 2017
    Posts
    19
    Location
    Quote Originally Posted by Paul_Hossler View Post
    Try this

    Set wb2 = Workbooks.Open("X:\089872 - IPW - Framework\02 Admin\01 DocRegisters\IPW-CAP-00-XX-RE-Z-0001.xlsx",  xlUpdateLinksAlways)

    In

    Set wb2 = Workbooks.Open("X:\089872 - IPW - Framework\02 Admin\01 DocRegisters\IPW-CAP-00-XX-RE-Z-0001.xlsx", UpdateLinks = xlUpdateLinksAlways)
    the UpdateLinks = xlUpdateLinksAlways part sort of looks like a 'Named Parameter' except that it should be UpdateLinks := xlUpdateLinksAlways with the colon

    Using it your way you shouldn't need it

    This seems to work, however im not getting a "can't update links" message. - is there a way this can be either ignored or updated as well?

    Cheers

  4. #4
    VBAX Regular
    Joined
    May 2017
    Posts
    19
    Location
    Quote Originally Posted by Auxie View Post
    This seems to work, however im not getting a "can't update links" message. - is there a way this can be either ignored or updated as well?

    Cheers
    Looks like I've been able to just use "UpdateLinks:=0" and its stopped the error messages.

Posting Permissions

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