+ Reply to Thread
Results 1 to 4 of 4

Multiple file hyperlinks – 2 codes put together please

  1. #1
    Registered User
    Join Date
    08-04-2011
    Location
    Belfast
    MS-Off Ver
    Excel 2003
    Posts
    8

    Multiple file hyperlinks – 2 codes put together please

    Hello

    And thank you for any help received. I don’t think the solution is too complicated (well it is for me) if you know anything about coding. After searching the internet I have 2 pieces of code which I hoped someone could put together please.

    Basically I’m trying to enter a macro that allows you to select a folder, and then takes all the files in that folder, names them in separate cells and then adds a hyperlink of each file to the filename in the spreadsheet.

    I’m working on a network hence it is useful if I can select the folder rather than manually type in the file path.

    The two bits of code are below, thanks!


    Firstly

    Please Login or Register  to view this content.

    Secondly

    Please Login or Register  to view this content.
    There will be different file types in the folders ranging from other excel files, autocad drawings, word documents etc.

    Really all I need is the output into Column A but I don’t know how to remove the other parts of the code.


    Also, if I copy this spreadsheet onto a *** with all the files in the same folder, will the hyperlinks still work?

    Thanks!
    Last edited by petesha; 08-08-2011 at 09:28 AM.

  2. #2
    Forum Expert tigeravatar's Avatar
    Join Date
    03-25-2011
    Location
    Colorado, USA
    MS-Off Ver
    Excel 2003 - 2013
    Posts
    5,361

    Re: Multiple file hyperlinks – 2 codes put together please

    petesha,

    Welcome to the forum. You should be able to use the following macro to accomplish what you're asking for. As for saving it to a disk, the links will only work if the disk can find the link locations (disk is in the same computer if the files are located in the C drive, or it would be successful if the files were on a network drive).

    Please Login or Register  to view this content.


    Hope that helps,
    ~tigeravatar

  3. #3
    Registered User
    Join Date
    08-04-2011
    Location
    Belfast
    MS-Off Ver
    Excel 2003
    Posts
    8

    Re: Multiple file hyperlinks – 2 codes put together please

    That's brilliant tigeravatar. Thank you very much. Does exactly what I asked for. Thank you also for you explanation which lends itself to another query I'm afraid.
    These spreadsheets are being set up on our network but will be put on a ** and then probably saved onto someone else's network. Is it possible to have a macro which would populate the table from the folder it is saved in? i.e. the spreadsheet will always sit in a folder with the files it needs to hyperlink to. Is there someway to automatically do this when the spreadsheet is opened?

    If not then that is grand. I can just write an explanation at the top of each spreadsheet that the macro has to be run to update all hyperlinks in the spreadsheet, based on the folder it is saved in.

    Thank you very much for you help, you have saved many hours of clicking!

  4. #4
    Registered User
    Join Date
    08-04-2011
    Location
    Belfast
    MS-Off Ver
    Excel 2003
    Posts
    8

    Re: Multiple file hyperlinks – 2 codes put together please

    Actually that seems to work fine. Stuck a couple of things on a different network as a test and it seems to update the hyperlinks automatically!

    Thank you very much for your help, problem resolved!

+ Reply to Thread

Thread Information

Users Browsing this Thread

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

Tags for this Thread

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