Results 1 to 3 of 3
  1. #1
    Silver Lounger
    Join Date
    Dec 2000
    Location
    California, USA
    Posts
    1,758
    Thanks
    0
    Thanked 0 Times in 0 Posts

    External Links (XP: SP3)

    Is it possible to determine if a files has external links without opening the file?

    Perhaps using "before save" to capture in a cell a true/false that the workbook has external links. I would then be able to extract that cell from a closed file.

    I would prefer doing the test on a closed file but open to the "before save" option.

    Thanks,
    John

  2. #2
    Silver Lounger
    Join Date
    Dec 2000
    Location
    California, USA
    Posts
    1,758
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: External Links (XP: SP3)

    Thanks Hans.

    Regards,
    John

  3. #3
    Plutonium Lounger
    Join Date
    Mar 2002
    Posts
    84,353
    Thanks
    0
    Thanked 29 Times in 29 Posts

    Re: External Links (XP: SP3)

    VBA cannot test the contents of a cell in a closed workbook, so you'd have to create a formula in the workbook containing the code that refers to the closed workbook. It all seems rather convoluted...

    But if you really want to do this, you could use the Workbook_BeforeSave event to store a value in a cell (in a hidden sheet if you like):

    Worksheets("SpecialSheet").Range("A1") = Not IsEmpty(ActiveWorkbook.LinkSources(xlExcelLinks))

    The cell will contain True if the workbook contains links to other workbooks, False if not.

Posting Permissions

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