Results 1 to 4 of 4
  1. #1
    3 Star Lounger
    Join Date
    Aug 2002
    Location
    St. Charles, Illinois
    Posts
    222
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Edit Links (Excel 2000)

    I have a macro that involves two spreadsheets. The first spreadsheet is labeled CWB = ActiveWorkbook. The second file is labeled DWB as the DestinationBook. At the end of all the actions in the macro I want to edit links. The file to select will always have the same name, "Interbranch file", but the Change Source file always changes to the name of the Destinatin file. How can I do this? Thank you.

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

    Re: Edit Links (Excel 2000)

    Could you provide some more details, e.g.:

    Is the new file in the same folder as the original file, or could it be in a different folder?
    Are all cells with links in a single worksheet, or are they in several worksheets?

  3. #3
    3 Star Lounger
    Join Date
    Aug 2002
    Location
    St. Charles, Illinois
    Posts
    222
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: Edit Links (Excel 2000)

    the new file is in a different folder. The links are in ten different sheets. With the first file always open, the macro opens the second file, unprotects 3 specific sheets, then copies 3 specific ranges from the destination file to the original file. When the copy is complete the macro performs an edit links and changes the source from the original file, "Interbranch" to the destination file name. We actually will be running this macro on 100 individual files. Thank you, I can send the macro if you need it.

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

    Re: Edit Links (Excel 2000)

    You should be able to use something like this:

    CWB.ChangeLink Name:="C:TestInterbranch file.xls", NewName:=DWB.FullName

    with, of course, the correct path for Interbranch file substituted. The FullName method will provide the complete path and filename for DWB.

Posting Permissions

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