Results 1 to 7 of 7

Change source of a link in VBA

Threaded View

DeeCeeL Change source of a link in VBA 02-13-2012, 10:21 AM
Mordred Re: Change source of a link... 02-13-2012, 10:31 AM
DeeCeeL Re: Change source of a link... 02-13-2012, 11:19 AM
OnErrorGoto0 Re: Change source of a link... 02-13-2012, 11:35 AM
DeeCeeL Re: Change source of a link... 02-13-2012, 11:47 AM
OnErrorGoto0 Re: Change source of a link... 02-13-2012, 11:55 AM
DeeCeeL Re: Change source of a link... 02-14-2012, 11:36 AM
  1. #1
    Registered User
    Join Date
    09-03-2010
    Location
    London
    MS-Off Ver
    Excel 2007
    Posts
    12

    Change source of a link in VBA

    Hi,

    As part of a VBA sequence, I want to change the source of a link in an excel spreadsheet.
    In the file there is only one source. I was the macro to change whatever source link is in the file to a given link.

    I started like that :

    Sub Changelink()

    Dim x0 As Variant
    x0 = ActiveWorkbook.LinkSources(xlExcelLinks)
    ChDir "G:\Example\Budgets"
    ActiveWorkbook.ChangeLink Name:=x0, _
    NewName:="example.xls", Type:=xlExcelLinks
    End Sub

    Many thanks for your help.

    Dee
    Last edited by DeeCeeL; 02-14-2012 at 11:39 AM.

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Bookmarks

Posting Permissions

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

Search Engine Friendly URLs by vBSEO 3.6.0 RC 1