+ Reply to Thread
Results 1 to 6 of 6

Help triggering macro off paste making targeted cell a hyperlink

  1. #1
    Registered User
    Join Date
    07-16-2019
    Location
    Virginia
    MS-Off Ver
    Windows 10 Enterprise
    Posts
    9

    Help triggering macro off paste making targeted cell a hyperlink

    Hello,
    I am new to VBA and coding in general so hopefully I am wording this correctly. I am trying to write a sub routine that that runs when a user paste a files address/path into a range of cells (B11:B9999). It then turns that target cells pasted into a hyperlink with the FileName variable as the text. Please see what Ive gotten so far.


    Please Login or Register  to view this content.
    Looks like the error is where I am adding the Hyperlink. Not sure of the syntax, any help would be greatly appreciated!!
    Last edited by JayBiTech; 07-19-2019 at 04:50 PM.

  2. #2
    Forum Guru
    Join Date
    07-25-2011
    Location
    Florida
    MS-Off Ver
    Excel 2003
    Posts
    9,613

    Re: Help triggering macro off paste making targeted cell a hyperlink

    Please Login or Register  to view this content.
    Surround your VBA code with CODE tags e.g.;
    [CODE]your VBA code here[/CODE]
    The # button in the forum editor will apply CODE tags around your selected text.

  3. #3
    Registered User
    Join Date
    07-16-2019
    Location
    Virginia
    MS-Off Ver
    Windows 10 Enterprise
    Posts
    9

    Re: Help triggering macro off paste making targeted cell a hyperlink

    Thank you so much, this worked perfectly!! Had a question about adding a hyperlink to the folder path in the column next to the link to the file. Thought I could just copy your code and use
    Please Login or Register  to view this content.
    but that's not working. Any idea on how to accomplish that? Thank you again.

  4. #4
    Forum Guru
    Join Date
    07-25-2011
    Location
    Florida
    MS-Off Ver
    Excel 2003
    Posts
    9,613

    Re: Help triggering macro off paste making targeted cell a hyperlink

    Please Login or Register  to view this content.

  5. #5
    Registered User
    Join Date
    07-16-2019
    Location
    Virginia
    MS-Off Ver
    Windows 10 Enterprise
    Posts
    9

    Re: Help triggering macro off paste making targeted cell a hyperlink

    Wow, thank you so much. Wanted to add more to your reputation but it wouldn't let me. Not exactly sure what I was doing wrong but your code worked. I did have the
    Formula: copy to clipboard
    Please Login or Register  to view this content.
    after the original hyperlink but that shouldn't make a big difference right? Maybe I just had to close out of it and reopen. Not sure but thank you again.

  6. #6
    Forum Guru
    Join Date
    07-25-2011
    Location
    Florida
    MS-Off Ver
    Excel 2003
    Posts
    9,613

    Re: Help triggering macro off paste making targeted cell a hyperlink

    Quote Originally Posted by JayBiTech View Post
    after the original hyperlink but that shouldn't make a big difference right? [sorry no]
    The value (text) of the original hyperlink is changed to display only the file name. That's why the offset hyperlink is before the original so it can get the path from the original before it's changed.

    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. Replies: 2
    Last Post: 11-15-2015, 01:33 AM
  2. [SOLVED] Avoid triggering the mailto hyperlink
    By Large114 in forum Excel Programming / VBA / Macros
    Replies: 0
    Last Post: 05-12-2015, 10:51 AM
  3. Need help making a macro that will find, copy, and paste a cell with a comma in it
    By EricC PhD in forum Excel Programming / VBA / Macros
    Replies: 5
    Last Post: 07-12-2012, 04:38 PM
  4. Running a macro and making it paste into the next blank cell.
    By connor8392 in forum Excel Programming / VBA / Macros
    Replies: 16
    Last Post: 08-13-2010, 05:16 AM
  5. Running a macro and making it paste into the next blank cell.
    By CAMTHEMAN20 in forum Excel Programming / VBA / Macros
    Replies: 5
    Last Post: 08-12-2010, 10:09 PM
  6. Macro to Copy and Paste the hyperlink cell value.
    By mvel_sky in forum Excel Programming / VBA / Macros
    Replies: 4
    Last Post: 09-13-2009, 12:22 AM
  7. Making a macro-triggering custom menu button "travel" with a file
    By lingyai in forum Excel Programming / VBA / Macros
    Replies: 7
    Last Post: 01-13-2007, 04:51 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