Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
I need to export the value of this formula in an excel . Formula contains set analysis.
When I try to export formula it doesn't recognize the set analysis..can anybody please help?
testresult = activedocument.Evaluate("num(only({<Last8WeeksReferencedateOpened = {"$(=max(Last8WeeksReferencedateOpened))"}>}Aggr($(vAging_Incidents_weekly),Last8WeeksReferencedateOpened)),'#0.00')")
msgbox testresult
1. create a variable e.g vTest
=num(only({<Last8WeeksReferencedateOpened = {"$(=max(Last8WeeksReferencedateOpened))"}>}Aggr($(vAging_Incidents_weekly),Last8WeeksReferencedateOpened)),'#0.00')
2. Change Macro to:
sub test
testresult = activedocument.Evaluate("vTest")
msgbox(testresult)
end sub
1. create a variable e.g vTest
=num(only({<Last8WeeksReferencedateOpened = {"$(=max(Last8WeeksReferencedateOpened))"}>}Aggr($(vAging_Incidents_weekly),Last8WeeksReferencedateOpened)),'#0.00')
2. Change Macro to:
sub test
testresult = activedocument.Evaluate("vTest")
msgbox(testresult)
end sub
I used the following
set testresult = ActiveDocument.Variables("vAging_WeeklyReport_LastWeek")
testresult= testresult.getcontent.string
testresult = activedocument.evaluate(testresult)