5 Replies Latest reply: May 31, 2013 8:34 AM by Michael Richter RSS

    Evaluate formula in macro

      Hi all,


      I have got this kind of formula in a lot of textboxes. To avoid copy mistakes and maybe do a quick change on the formula in every box, I want to evaluate the value by a macro and just give parameters to it. Is this possible?


      My formula:

      only({<KPI_Year={'$(vYearMaxU)'},KPI_Month={'$(vMonthMaxU)'},rowid={`$(=min({<KPI_Year={'$(vYearMaxU)'},KPI_Month={'$(vMonthMaxU)'},KPI_Category_Name={"$(=FieldValue('KPI_Category_Name',1))"}>}rowid,1))`}>} Statuscolor)


      Can someone tell me how to evaluate this in a macro? I never implemented a macro but tried it with

      sub value()
          value = activedocument.Evaluate("formula");
      end sub

      but the " " dont work because there are also some inside the formula.


      Thanks for any kind of help!

      Kind regards