+ Reply to Thread
Results 1 to 18 of 18

Run macro from hyperlink

  1. #1
    Registered User
    Join Date
    07-03-2014
    Location
    Johannesburg
    MS-Off Ver
    Office 2010
    Posts
    17

    Run macro from hyperlink

    Hi All

    I have a piece of code that works great but I would like to know how I can call it from a hyperlink. But this needs to be applied if i copy the hyperlink to the cells below it.
    I.E. C1 will have the hyperlink which pulls reference from A1 & B1. I need to copy the hyperlink to the cells below so that clicking on the hyperlink in C2 now, will pull info from A2 & B2....and so on.

    Any assistance would be greatly appreciated

  2. #2
    Forum Expert sintek's Avatar
    Join Date
    12-04-2015
    Location
    Cape Town
    MS-Off Ver
    2013 | 2016 | 2019
    Posts
    13,232

    Re: Run macro from hyperlink

    have a piece of code that works great
    So let's see it...Ideally upload a sample workbook with a before/after scenario
    Last edited by sintek; 02-19-2018 at 03:24 AM.
    Good Luck
    I don't presume to know what I am doing, however, just like you, I too started somewhere...
    One-day, One-problem at a time!!!
    If you feel I have helped, please click on the star to left of post [Add Reputation]
    Also....add a comment if you like!!!!
    And remember...Mark Thread as Solved.
    Excel Forum Rocks!!!

  3. #3
    Registered User
    Join Date
    07-03-2014
    Location
    Johannesburg
    MS-Off Ver
    Office 2010
    Posts
    17

    Re: Run macro from hyperlink

    Quote Originally Posted by sintek View Post
    So let's see it...
    I've created the hyperlink as follows...

    Please Login or Register  to view this content.

    Once i click on it, it calls the following up...

    Please Login or Register  to view this content.
    Last edited by Zorro23; 02-19-2018 at 03:47 AM.

  4. #4
    Forum Expert sintek's Avatar
    Join Date
    12-04-2015
    Location
    Cape Town
    MS-Off Ver
    2013 | 2016 | 2019
    Posts
    13,232

    Re: Run macro from hyperlink

    hi Zorro23...

    In future please view the forum rules before posting. Your post does not comply with rule #3.
    3. Use code tags around code. Posting code without them makes your code hard to read and difficult to be copied for testing.
    So, do the following:
    Edit your post, highlight your code and click the [#] button at the top of the post window.

    I also notice that you are using code here i.e.
    Please Login or Register  to view this content.
    by code provided in this post...https://www.excelforum.com/excel-pro...ml#post4846088

    Which incidentally you have not yet responded to and also had to be rectified by a moderator because of code tags...
    Takes some time and read the Forum rules please...
    https://www.excelforum.com/forum-rul...rum-rules.html

  5. #5
    Registered User
    Join Date
    07-03-2014
    Location
    Johannesburg
    MS-Off Ver
    Office 2010
    Posts
    17

    Re: Run macro from hyperlink

    Hi there

    My apologies on not adhering to the rues. I have just edited the code and saved.
    Please advise if all ok now?

    Regarding my previous post (https://www.excelforum.com/excel-pro...ml#post4846088)I did respond and thought my reply went through ?

  6. #6
    Forum Expert sintek's Avatar
    Join Date
    12-04-2015
    Location
    Cape Town
    MS-Off Ver
    2013 | 2016 | 2019
    Posts
    13,232

    Re: Run macro from hyperlink

    Thank you...Please upload a sample file...I'm trying to understand what Range("$AD12") has to do with your request in Post 1

  7. #7
    Registered User
    Join Date
    07-03-2014
    Location
    Johannesburg
    MS-Off Ver
    Office 2010
    Posts
    17

    Re: Run macro from hyperlink

    Please see attached (hope it comes through)
    Attached Files Attached Files

  8. #8
    Forum Expert sintek's Avatar
    Join Date
    12-04-2015
    Location
    Cape Town
    MS-Off Ver
    2013 | 2016 | 2019
    Posts
    13,232

    Re: Run macro from hyperlink

    The code in your upload allows for all the info in Column B to be made...Is this correct...

    So it is my understanding that when clicking in different cells in column C you want to send all the info but to the corresponding name in Col A in that hyperlink row...

    Edit...
    Are you trying to send an email to everyone in Col A automatically or only if you type in the name or only if you copy hyperlink...
    What is the purpose of the hyperlink in Col C...
    Why not just enter names into Col A and the code will do rest?
    See attached...
    Attached Files Attached Files
    Last edited by sintek; 02-19-2018 at 04:57 AM.

  9. #9
    Registered User
    Join Date
    07-03-2014
    Location
    Johannesburg
    MS-Off Ver
    Office 2010
    Posts
    17

    Re: Run macro from hyperlink

    Basically, we have a list of names (column A) and column B is the additional info we will need to forward / add in the email accordingly. What essentially happens is that our marketing dept calls client to do a follow up. At the end of the call we will ask them if we can drop them a mail with some additional info (column B). The idea is to click on the link button in column C as we go down the list and send off the emails accordingly.
    I still need to add a few more columns for info so at the end of the day, it'll email the client with all the relevant info in that particular row....

    Does this make sense ?

  10. #10
    Forum Expert sintek's Avatar
    Join Date
    12-04-2015
    Location
    Cape Town
    MS-Off Ver
    2013 | 2016 | 2019
    Posts
    13,232

    Re: Run macro from hyperlink

    Why not expedite the procedure by having one code that loops through the entire names in Col A and sends the email to all at once?

  11. #11
    Registered User
    Join Date
    07-03-2014
    Location
    Johannesburg
    MS-Off Ver
    Office 2010
    Posts
    17

    Re: Run macro from hyperlink

    Because not everyone is a hit. Sometimes email addresses change, circumstances change etc so the list is basically to be used once we've spoken to the client. We can send a bulk list out but that'll be defeating the purpose of our process.

  12. #12
    Forum Expert sintek's Avatar
    Join Date
    12-04-2015
    Location
    Cape Town
    MS-Off Ver
    2013 | 2016 | 2019
    Posts
    13,232

    Re: Run macro from hyperlink

    Okay, so help me help you...You have a worksheet with multiple names in Col A...email addresses in another Column same row...

    You go down that list and phone clients...If they agree to follow up email...you click col C corresponding client row and an email gets sent to that client with all info in Col B as per email Code...

    And this you do immediately after talking to client or end of day after speaking to all clients?

  13. #13
    Registered User
    Join Date
    07-03-2014
    Location
    Johannesburg
    MS-Off Ver
    Office 2010
    Posts
    17

    Re: Run macro from hyperlink

    All correct....so this will happen at the end of the client call, not end of day.
    So, once finished chatting with client, click on col C row for him and fire off the email. Then move onto next client ....

  14. #14
    Forum Expert sintek's Avatar
    Join Date
    12-04-2015
    Location
    Cape Town
    MS-Off Ver
    2013 | 2016 | 2019
    Posts
    13,232

    Re: Run macro from hyperlink

    K, look at attached...Still have no idea what the purpose of hyperlink was...Anyway...
    Lets assume you have spoken to client and he wants follow up email... Type in "x" or any letter for that matter...in col C corresponding to that client row and press enter...
    Attached Files Attached Files

  15. #15
    Forum Expert sintek's Avatar
    Join Date
    12-04-2015
    Location
    Cape Town
    MS-Off Ver
    2013 | 2016 | 2019
    Posts
    13,232

    Re: Run macro from hyperlink

    Or perhaps even this...Click on cell in Col c and after the email sends, the words Sent will appear
    Attached Files Attached Files

  16. #16
    Registered User
    Join Date
    07-03-2014
    Location
    Johannesburg
    MS-Off Ver
    Office 2010
    Posts
    17

    Re: Run macro from hyperlink

    Awesome work !!! works great.
    Assuming the only difference is the cell is calculating off a "non empty" cell, rather than a click ....but all good.

    I'll carry on putting the various pieces of the puzzle together so that we have an email address added, and a couple of other things.

    Thanks again for your help !!!

  17. #17
    Forum Expert sintek's Avatar
    Join Date
    12-04-2015
    Location
    Cape Town
    MS-Off Ver
    2013 | 2016 | 2019
    Posts
    13,232

    Re: Run macro from hyperlink

    Pleasure...See Post 15...perhaps more suitable...
    Ps Just a heads up...Being new and all lol...We do appreciate the odd reputation points if we were able to fulfill your requirements...
    Left of post the star that says...Add Reputation...Thanks

  18. #18
    Registered User
    Join Date
    07-03-2014
    Location
    Johannesburg
    MS-Off Ver
    Office 2010
    Posts
    17

    Re: Run macro from hyperlink

    Freakin Awesome !!!

    Thanks a mil !

+ 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] Hyperlink Macro
    By Thunder97 in forum Excel Programming / VBA / Macros
    Replies: 4
    Last Post: 04-17-2014, 12:59 PM
  2. [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
  3. When executing macro via hyperlink, macro doesn't re-scroll window back to A1
    By rain4u in forum Excel Programming / VBA / Macros
    Replies: 9
    Last Post: 05-15-2011, 02:30 PM
  4. [SOLVED] Can I get a hyperlink to run a macro?
    By Scott buckwalter in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 08-11-2005, 12:05 PM
  5. [SOLVED] Intra-workbook hyperlink: macro/function to return to hyperlink ce
    By marika1981 in forum Excel General
    Replies: 3
    Last Post: 05-06-2005, 01:06 AM
  6. Macro to Copy Hyperlink to another file as a HYPERLINK, not text...
    By dollardoc in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 04-06-2005, 08:07 PM
  7. [SOLVED] Hyperlink and macro
    By Michelle in forum Excel Programming / VBA / Macros
    Replies: 0
    Last Post: 02-25-2005, 12:06 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