+ Reply to Thread
Results 1 to 5 of 5

creating hyperlink to a file created earlier in the macro

  1. #1
    Registered User
    Join Date
    06-26-2024
    Location
    Midlands, England
    MS-Off Ver
    Microsoft Office 365 Pro Plus
    Posts
    3

    creating hyperlink to a file created earlier in the macro

    Hello all,

    Very new to Excel VBA so please bare that in mind. I've managed to piece together a macro by taking bits from websites / other forums which is why it may be a little clunky, but I can't seem to find what I'm looking for. Below is my very sub-par code. Essentially I am creating a new file from an existing workbook and then creating an email with which a link to this file is included. At the minute I have managed to link to the folder that the file is saved in, but I cannot link it to that specific file that has been created earlier in the macro. This is the line I am talking about, full code is in the attached file. In the file it is refering to Macro "New_doc_save"

    " <a href=""G:\Manufacturing\Quality\Internal_Defect_Log\IDL_Investigations"">IDL Investigation Document</a>

    Any help would be appreciated - as I mentioned I am a complete novice so I appreciate the code could probably be simplified / improved. Any feedback is appreciated, cheers Brad
    Attached Files Attached Files
    Last edited by bradleigh97; 06-26-2024 at 11:00 AM.

  2. #2
    Valued Forum Contributor
    Join Date
    09-18-2023
    Location
    Geogia, USA
    MS-Off Ver
    365
    Posts
    331

    Re: creating hyperlink to a file created earlier in the macro

    Give this a try:

    Please Login or Register  to view this content.
    edit: added a couple comments

  3. #3
    Forum Expert ByteMarks's Avatar
    Join Date
    07-23-2018
    Location
    UK
    MS-Off Ver
    O365 32bit (Windows)
    Posts
    3,175

    Re: creating hyperlink to a file created earlier in the macro

    Use file:// when using href to link to a file.

    Please Login or Register  to view this content.
    Last edited by ByteMarks; 06-27-2024 at 11:54 AM.

  4. #4
    Registered User
    Join Date
    06-26-2024
    Location
    Midlands, England
    MS-Off Ver
    Microsoft Office 365 Pro Plus
    Posts
    3

    Re: creating hyperlink to a file created earlier in the macro

    Hi, works perfectly thank you so much!

  5. #5
    Forum Expert ByteMarks's Avatar
    Join Date
    07-23-2018
    Location
    UK
    MS-Off Ver
    O365 32bit (Windows)
    Posts
    3,175

    Re: creating hyperlink to a file created earlier in the macro

    You're welcome. Thanks for the feedback.

+ 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. [SOLVED] VBA - Open a copied file named earlier in the macro
    By jsr22788 in forum Excel Programming / VBA / Macros
    Replies: 7
    Last Post: 09-20-2023, 04:26 AM
  2. Creating a hyperlink on a seperate worksheet to a created PDF
    By zakmattin in forum Excel Programming / VBA / Macros
    Replies: 0
    Last Post: 02-12-2015, 12:54 PM
  3. Replies: 0
    Last Post: 06-22-2014, 04:18 PM
  4. VBA Macro created hyperlink problem
    By ew03 in forum Excel Programming / VBA / Macros
    Replies: 3
    Last Post: 09-25-2012, 06:19 PM
  5. Creating a file in a newly created folder.
    By AnthonyWB in forum Excel Programming / VBA / Macros
    Replies: 14
    Last Post: 04-12-2010, 03:01 PM
  6. Why can I open only the last pdf file hyperlink created?
    By Soniya Breedt in forum Excel Formulas & Functions
    Replies: 0
    Last Post: 07-14-2006, 04:30 AM
  7. Replies: 4
    Last Post: 05-30-2005, 06:05 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