+ Reply to Thread
Results 1 to 2 of 2

Hyperlink to run macro not working

  1. #1
    Registered User
    Join Date
    12-20-2016
    Location
    United States
    MS-Off Ver
    2016
    Posts
    46

    Hyperlink to run macro not working

    Hello everyone! I've scoured the Internet for solutions to this for quite some time over the past few days, and I've tried employing solutions I've found suggested for other people but cannot seem to get any of the examples to work once I modify them.

    Basically I have tried writing the below formula in Row 2, Column R of my spreadsheet and I have filled the formula down all of quite a few rows of column R:

    Please Login or Register  to view this content.
    I have a public sub in this same worksheet named "CopyPersonnelData()", which places some data in cells of another worksheet based on some values in the active cell row, and then this sub calls a module named "SendEmail()", which composes an email in Microsoft Outlook.

    My CopyPersonnelData() and SendEmail() subs work just fine, but I cannot find a way to successfully call the CopyPersonnelData() via a hyperlink. I have over 200 rows of data, so dynamically creating a hyperlink based on the value of another cell the way I've tried doing would be the best approach... because not every row needs ability to call the CopyPersonnelData() sub... only if the value in Column J of the same row is <60.

    Any good solutions for how to do this, without creating a hyperlink to unnecessarily open a webpage or a local file/path? Thanks so much!!!

  2. #2
    Administrator 6StringJazzer's Avatar
    Join Date
    01-27-2010
    Location
    Tysons Corner, VA, USA
    MS-Off Ver
    MS 365 Family 64-bit 2505
    Posts
    27,272

    Re: Hyperlink to run macro not working

    What do you have in mind for the operational scenario here? Do you want to click on the link to cause CopyPersonnelData to run for that row? You can't do that with a hyperlink. You will have to use the SelectionChange event.
    Please Login or Register  to view this content.
    For the best possible help please attach your file.
    Jeff
    | | |會 |會 |會 |會 | |:| | |會 |會
    Read the rules
    Use code tags to [code]enclose your code![/code]

+ 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] Dynamic hyperlink in VBA macro - HYPERLINK function not working
    By patsyluke in forum Excel Formulas & Functions
    Replies: 3
    Last Post: 04-24-2020, 04:59 AM
  2. Macro Excel to Outlook - Hyperlink not working
    By Andrew.Trevayne in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 11-27-2018, 04:00 AM
  3. [SOLVED] Add a *working* hyperlink into existing hyperlink field using vba
    By Zandia in forum Access Tables & Databases
    Replies: 2
    Last Post: 06-13-2016, 05:49 PM
  4. [SOLVED] Macro to activate Hyperlink not working
    By Rick23 in forum Excel Programming / VBA / Macros
    Replies: 21
    Last Post: 09-19-2014, 03:15 AM
  5. Macro to create hyperlink list not working. Where am I going wrong?
    By JPWRana in forum Excel Programming / VBA / Macros
    Replies: 6
    Last Post: 07-10-2014, 04:24 PM
  6. [SOLVED] Excel 2010 Create a macro to check if cell contains hyperlink then apply hyperlink style
    By chasidar in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 09-12-2013, 04:48 AM
  7. Replies: 3
    Last Post: 05-06-2005, 01:06 AM

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