Consulting

Results 1 to 3 of 3

Thread: Solved: Update links prompt

  1. #1
    VBAX Newbie
    Joined
    Dec 2005
    Posts
    4
    Location

    Solved: Update links prompt

    Hi

    I've written a script that copies all workbooks in a directory into annother workbook. The problem is that all those files contain links to other workbooks.
    So each time the script opens a workbook that contains one or more links to other workbooks, you'll be prompted to update the links.

    As you can imagine this is very annoying when you have 50 ore more files in that directory.

    I've tried following code, but this does not seem to have any effect...

    [VBA]
    Application.DisplayAlerts = False
    Set tWB = Workbooks.Open(FileName:=Path & FileName) 'open file, set to tWB variable
    tWB.UpdateRemoteReferences = False
    Application.DisplayAlerts = True [/VBA]

    Perhaps anyone has done this before and knows a better way?

    Thanks in advance!

  2. #2
    Hello Jokada,

    Quote Originally Posted by Jokada
    Perhaps anyone has done this before and knows a better way?
    Try replacing:

    Workbooks.Open(FileName:=Path & FileName)

    With

    Workbooks.Open(FileName:=Path & FileName, UpdateLinks:=0)

    See the VBA help for the Open method for more details.

    Rembo

  3. #3
    VBAX Newbie
    Joined
    Dec 2005
    Posts
    4
    Location
    Thx rembo!

Posting Permissions

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