+ Reply to Thread
Results 1 to 2 of 2

copying hyperlinks problems

Hybrid View

  1. #1
    Registered User
    Join Date
    10-25-2013
    Location
    canada
    MS-Off Ver
    Excel 2007
    Posts
    79

    copying hyperlinks problems

    Hello.

    I have a folder (:C/Documents/Main) that contains 3 more folders (folders A, B, & C containing excel files) and several other individual excel files. On one of the excel files in the Main folder i have hyperlinks set up to the files in folder C. The hyperlink path reads as

    :C/Documents/Main/folderC/excelfile.xlsm.

    I want to copy that hyperlink from the file in the Main folder to a file in folder A, but when I do the hyperlink path changes to

    :C/Documents/Main/folderA/folderC/excelfile.xlsm.

    Why does it do this, and is there a way to correct this action? I have many hyperlinks to set up and I would prefer to copy and paste them instead of have to do each one individually again.

    Thanks

  2. #2
    Valued Forum Contributor tony h's Avatar
    Join Date
    03-14-2005
    Location
    England: London and Lincolnshire
    Posts
    1,187

    Re: copying hyperlinks problems

    I am not sure why this is happening but you could try Listing all the current hyperlinks make any changes and then another routine to add them.
    Sub AddHyp()
    '
        ActiveSheet.Hyperlinks.Add Anchor:=Selection, Address:="lv2\excelfile.xlsm", TextToDisplay:="lv2\excelfile.xlsm"
    End Sub
    
    Sub ListHyp()
        Dim hyp As Hyperlink
        For Each hyp In ActiveSheet.Hyperlinks()
            Debug.Print hyp.Address, hyp.TextToDisplay
        Next
    End Sub
    The code here givesyou the main bits. You will need to change ListHyp to put the list somewhere useful and the add to read the data from that place.


    click on the * Add Reputation if this was useful or entertaining.

+ Reply to Thread

Thread Information

Users Browsing this Thread

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

Similar Threads

  1. VBA & 2 hyperlinks problems
    By Jovica in forum Excel Programming / VBA / Macros
    Replies: 0
    Last Post: 10-28-2012, 01:53 PM
  2. Problems with hyperlinks in a basic SUM formula
    By Adrbei in forum Excel General
    Replies: 2
    Last Post: 08-16-2011, 04:18 AM
  3. problems with hyperlinks linking to other worksheets
    By Mostlygood in forum Excel Programming / VBA / Macros
    Replies: 3
    Last Post: 11-27-2009, 09:39 AM
  4. Problems with Hyperlinks from Excel
    By lexy1107 in forum Excel General
    Replies: 1
    Last Post: 02-06-2008, 05:03 PM
  5. [SOLVED] I have problems with hyperlinks to Adobe pdf files
    By STEVESEY in forum Excel General
    Replies: 2
    Last Post: 04-29-2005, 02:06 PM

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