Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hi
In a macro I want to assign the sum of selected field values to a variable - eg sum(Amount). Is this possible? What is the syntax that I should use?
Can I do the calculation directly in the macro or can I get the value from a chart that I have in my application?
Where is the best place to find some documentation about this - I have looked at the API Guide but did not find the solution.
Thanks, Kevin Long
Hi Kevin,
You can use "Evaluate":
msgbox(ActiveDocument.Evaluate("Sum(Sales)"))
Thanks Johannes
This works ok but out of interest is there a way of getting the values from a chart? Let's say that I have a chart that has calculations for period to date actual and budget sales along with number of working days etc. In my macro I run some selections to filter the table to show a single record for a sales person. Can I get the values from each of the chart expressions using something like GetSheetObject?
Thanks, Kevin