Invoke a macro through a hyperlink

    Invoke a macro through a hyperlink

    From a hyperlink on my sheet, can I trigger a macro? I cannot use buttons since I need a hyperlink for each of the rows in a dynarange.

    Based on the click of hyperlink, I need certain actions that need to run, and the actions are a part of the macro that I build.

    yes you can.

    in B1 cell put something like : =if(A1=0,"macro stop",yourmacro())

    yourmacro() should look like this:

    Source Code

    1. function yourmacro()
    2. {
    3. // reset the macro trigger
    4. activesheet()->range('A1')->value=0;
    5. // do something
    6. }

    then you use an hyperlink to set the A1 cell to 1 using transfer values

    note: if triggering from a link you cannot use "return" statements (in Jedox 5.1 though, I have not tested in 6 yet)

    Post hoc, non est propter hoc
    It worked.. looks like there was another error in my Macro which was not showing out explicitly. When I right clicked on a cell and clicked "Show Error", it gave me where the error was.

    Thanks Laloune. I will also check and see if return works, as I need to have a message box based confirmation to proceed.