+ Reply to Thread
Results 1 to 5 of 5

Executing hyperlink

  1. #1
    Registered User
    Join Date
    08-07-2011
    Location
    america
    MS-Off Ver
    Excel 2003
    Posts
    18

    Executing hyperlink

    Hi-

    I'm working on a project that requires me to execute a hyperlink if a cell flips over to "1"

    A1= a formula that gives me 0 or 1

    A2= has the link

    I want:

    =if(a1=1, Execute the link in A2, Or else 0)


    I know there's a macro that I can create to accomplish this. Any other way?

  2. #2
    Administrator FDibbins's Avatar
    Join Date
    12-29-2011
    Location
    Duncansville, PA USA
    MS-Off Ver
    Excel 7/10/13/16/365 (PC ver 2310)
    Posts
    52,926

    Re: Executing hyperlink

    do you want to actually activate/apply/use the hyperlink, or just have it "be" there if A1=1?
    1. Use code tags for VBA. [code] Your Code [/code] (or use the # button)
    2. If your question is resolved, mark it SOLVED using the thread tools
    3. Click on the star if you think someone helped you

    Regards
    Ford

  3. #3
    Registered User
    Join Date
    08-07-2011
    Location
    america
    MS-Off Ver
    Excel 2003
    Posts
    18

    Re: Executing hyperlink

    I want to activate the link.

    So if the link is www.google.com

    So if A1=1 I want www.google.com to be executed and opened in firefox/IE

  4. #4
    Forum Guru DonkeyOte's Avatar
    Join Date
    10-22-2008
    Location
    Northumberland, UK
    MS-Off Ver
    O365
    Posts
    21,531

    Re: Executing hyperlink

    Quote Originally Posted by calhawk01
    I know there's a macro that I can create to accomplish this. Any other way?
    No, you cannot use a formula to physically execute the hyperlink and, I am assuming given above quote that you have the code you need to do this ?

  5. #5
    Registered User
    Join Date
    08-07-2011
    Location
    america
    MS-Off Ver
    Excel 2003
    Posts
    18

    Re: Executing hyperlink

    Yup, here's what i'm using

    Please Login or Register  to view this content.
    "BUYSTRATEGY2" is a simple macro that executes the hyperlink

    But there is still a problem. I'm trying to communicate with a broker's API to execute my buy/sell orders.

    The buy orders is based on the formula in G8. When I get a ''buy'' signal, G8 turns into 1. But the problem that I'm facing now is that.. lets assume that G8 turns into 1 when X>Y. The value that I'm getting for X are streaming quotes. So even though G8 is > that Y.. and continues to be greater than Y for the next 20 quotes.. the problem i'm facing is that every time I get a newer quote for X that is greater than Y.. my macro is executed and sends an additional order to the broker to buy shares.

    Is there a way to limit the macro to the ''first'' time G8 flips over to 1 in a given day? Or between a certain time.. 9:30 am to 4 PM
    Last edited by Leith Ross; 12-25-2012 at 08:30 PM. Reason: Added Code Tags

+ Reply to Thread

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

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