+ Reply to Thread
Results 1 to 5 of 5

Creating multiple hyperlinks to files in a folder - one file per hyperlink per cell

  1. #1
    Registered User
    Join Date
    05-05-2014
    Location
    California
    MS-Off Ver
    Excel 2007
    Posts
    6

    Creating multiple hyperlinks to files in a folder - one file per hyperlink per cell

    I am trying to insert hyperlinks for picture files into cells down a column in Excel 2007. I have a folder on the local drive which contains barcode images. The images are named: barcode001.png, barcode002.png, barcode003.png...on up to barcode319.png. I am able to click on a cell (say B1) and create a hyperlink to the first image and I can click on the next cell down (B2) and create a hyperlink to the second barcode image and on down the file but I'd rather find a way to get all 319 cells filled in fast. Each cell points to the next barcode image. Seems like there would be a macro or something that could point to the first barcode, then for the next cell use the same link but ratchet up one number, then add another number to the filename for the next cell down and so on.

    I was originally guessing I might be able to get the first two or three cells done manually and simply drag down the column to have the cells auto fill much link you can do by keying in a 1 in the first cell and a 2 in the next cell and drag to get 1, 2, 3, 4, 5, 6, ....

    That would have been just too easy I guess because that didn't work for me at all. I've looked through Google searches and through many posts in this forum and haven't come across exactly what I'm trying to do. Please point me in the right direction if you know how to do this.

    Thanks,
    Steve

  2. #2
    Valued Forum Contributor
    Join Date
    01-19-2010
    Location
    Melbourne Australia
    MS-Off Ver
    latest is Excel 2016. have older versions
    Posts
    624

    Re: Creating multiple hyperlinks to files in a folder - one file per hyperlink per cell

    Hi Steve,

    (and welcome to the forums )

    I use the following code to create a hyperlink to a worksheet in my workbook from a "list of all worksheets" each time after i add in a new worksheet which may be worth exploring

    Please Login or Register  to view this content.
    If you set the range to your list (B1:b319) for the selection yopu should get close

    Cheers

    Jmac1947

    1. Please consider clicking on the * Add Reputation if you think this post has helped you
    2. Mark your thread as SOLVED when question is resolved

  3. #3
    Valued Forum Contributor
    Join Date
    01-19-2010
    Location
    Melbourne Australia
    MS-Off Ver
    latest is Excel 2016. have older versions
    Posts
    624

    Re: Creating multiple hyperlinks to files in a folder - one file per hyperlink per cell

    again, maybe not

    I just reread your post in a bit more detail. My code expects the "target" to be in same workbook so the change tot he c.hyperlinks.add will be a bit more complex. The VBA help may be of assistance if nobody else chimes in with the complete solution... sorry

    Jmac

  4. #4
    Registered User
    Join Date
    05-05-2014
    Location
    California
    MS-Off Ver
    Excel 2007
    Posts
    6

    Re: Creating multiple hyperlinks to files in a folder - one file per hyperlink per cell

    Thanks for the thought jmac1947. I am hoping I get a response that will point me to a files located in a folder on the local drive but I'll definitely experiment with tweaking what you posted if nobody has any other ideas.

    Steve

  5. #5
    Registered User
    Join Date
    05-05-2014
    Location
    California
    MS-Off Ver
    Excel 2007
    Posts
    6

    Re: Creating multiple hyperlinks to files in a folder - one file per hyperlink per cell

    Just found the script I needed in a different post in this forum located here: http://www.excelforum.com/excel-prog...en-folder.html

    In that post, there's a link to this page which has the exact script I needed. Very cool.

    Thanks!
    Last edited by JBeaucaire; 12-27-2019 at 03:51 AM.

+ 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. Macro to create hyperlinks for multiple unique excel files in a given folder
    By coop442s in forum Excel Programming / VBA / Macros
    Replies: 3
    Last Post: 12-26-2019, 03:23 PM
  2. Extracting data from multiple .xls files in folder and creating new workbook
    By haedyr in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 12-01-2013, 07:28 PM
  3. Creating a summary of multiple files with the same formatting in a folder
    By thebigdawg in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 09-20-2013, 10:03 AM
  4. [SOLVED] How to merge multiple excel files(xls) in one folder into a new xls file.
    By Hayk in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 01-24-2013, 11:48 AM
  5. Multiple Files in a folder - Copying to one file
    By ingwingfingerling in forum Excel Programming / VBA / Macros
    Replies: 11
    Last Post: 12-31-2012, 04:57 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