+ Reply to Thread
Results 1 to 6 of 6

Automatically linking cell entries with variable folder names

  1. #1
    Registered User
    Join Date
    12-17-2020
    Location
    Germany
    MS-Off Ver
    2013
    Posts
    3

    Automatically linking cell entries with variable folder names

    Hello everyone,

    already a BIG thank you to all members that helped me by being active in this forum. I have been a quiet benefactor until now but today I run into a small problem and simply can not wrap my head around it. It does not seem to be a big deal though, I simply can not find a suitable answer.

    The basic idea is to hyperlink cell entries from one row to specified PDFs in a folder structure. Since each row will contain PDFs for different projects, they will be set into specified folders.

    Please Login or Register  to view this content.
    I took this a few days ago, before altering it to my specs, from another post here which seemed a bit older by now, but I can not find it at the moment.

    As shown in the code, the folder names will be specified in column H in each row, while the rest of the row will contain file names that will be linked on entering. The number of file names will be variable, maybe I will only need to link five or six. For testing I used .txt files, since they are easier to create than PDFs.

    Trying this code in my sheet produces a runtime error 1004 on entering a filename in a cell suitable for linking (A-G/I-Z). The code runs fine without the additional variable folder name in H. Also, since we are running a protection software on our PCs I could not copy/paste the code from my macro, I hope I did not misspell something.

    Thanks for any help, anything is welcome, also for removing smaller problems I might run into later.

  2. #2
    Valued Forum Contributor rollis13's Avatar
    Join Date
    01-26-2012
    Location
    Cordenons
    MS-Off Ver
    Excel 2016 32bit - Win 11
    Posts
    915

    Re: Automatically linking cell entries with variable folder names

    If I understood your project for sure you have at least 3 misspellings:

    1 here:
    Please Login or Register  to view this content.
    and 2 here:
    Please Login or Register  to view this content.

  3. #3
    Registered User
    Join Date
    12-17-2020
    Location
    Germany
    MS-Off Ver
    2013
    Posts
    3

    Re: Automatically linking cell entries with variable folder names

    Quote Originally Posted by rollis13 View Post
    If I understood your project for sure you have at least 3 misspellings:

    1 here:
    Please Login or Register  to view this content.
    and 2 here:
    Please Login or Register  to view this content.
    And with these corrections the code works perfectly. The second one actually was a typo made by me, since I could not copy.

    You mentioned three misspellings? Might share where the third one may be?

  4. #4
    Valued Forum Contributor rollis13's Avatar
    Join Date
    01-26-2012
    Location
    Cordenons
    MS-Off Ver
    Excel 2016 32bit - Win 11
    Posts
    915

    Re: Automatically linking cell entries with variable folder names

    Are you blind It can't be: ActivateSheet.

  5. #5
    Registered User
    Join Date
    12-17-2020
    Location
    Germany
    MS-Off Ver
    2013
    Posts
    3

    Re: Automatically linking cell entries with variable folder names

    No, I got that one. I overread Adress to Address and thought, you only posted two corrections.

    Thanks for the quick help, I will mark this one as solved.

  6. #6
    Valued Forum Contributor rollis13's Avatar
    Join Date
    01-26-2012
    Location
    Cordenons
    MS-Off Ver
    Excel 2016 32bit - Win 11
    Posts
    915

    Re: Automatically linking cell entries with variable folder names

    Ah, "Adress", that was the easiest to spot.
    Glad having been of some help .
    Last edited by rollis13; 12-21-2020 at 11:57 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. Replies: 12
    Last Post: 11-03-2018, 07:34 AM
  2. Linking Two Workbooks in the Same Folder and Excluding the Folder Location
    By 96Mustang460cid in forum Excel Formulas & Functions
    Replies: 1
    Last Post: 12-29-2017, 02:27 AM
  3. Can I Automatically Generate Variable Names?
    By vba_madness in forum Excel Programming / VBA / Macros
    Replies: 12
    Last Post: 12-06-2016, 10:00 AM
  4. Linking external file using variable file names
    By asburytl in forum Excel General
    Replies: 4
    Last Post: 02-24-2012, 01:13 AM
  5. Linking cells in VB with variable worksheet names...
    By daowen in forum Excel Programming / VBA / Macros
    Replies: 7
    Last Post: 07-15-2009, 09:08 AM
  6. Linking Tab Names to a single cell with a worksheet
    By Manager in forum Excel Programming / VBA / Macros
    Replies: 4
    Last Post: 06-08-2006, 02:10 PM
  7. VBA automatically updating variable names
    By Mike T in forum Excel Programming / VBA / Macros
    Replies: 3
    Last Post: 03-31-2006, 01:25 PM

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