Error Checking in Excel
Thanks Thanks:  0
Likes Likes:  0
Results 1 to 2 of 2

Thread: Whats wrong with my CHANGELINK code?

  1. #1
    Board Regular
    Join Date
    Mar 2002
    Location
    Houston TX
    Posts
    550
    Post Thanks / Like
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Default

    Sub MyLinks()

    Dim aLinks As Variant
    Dim i As Integer

    aLinks = ActiveWorkbook.LinkSources(xlExcelLinks)
    If Not IsEmpty(aLinks) Then
    For i = 1 To UBound(aLinks)
    ActiveWorkbook.ChangeLink Name:=aLinks(1), NewName:=ActiveWorkbook.Name, Type:=xlExcelLinks
    Next i
    End If
    End Sub


  2. #2
    Board Regular
    Join Date
    Mar 2002
    Location
    Houston TX
    Posts
    550
    Post Thanks / Like
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Default

    I suppose theres nothing wrong with it...in that it DOES work IF both old/new source have the same NAMED target sheet.

    If not, it bombs outs.

    Any idea how to specify the SHEET when changing the link?

Some videos you may like

User Tag List

Like this thread? Share it with others

Like this thread? Share it with others

Posting Permissions

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