Running Queries from Buttons

With the Analytics Edge Core Add-in, it is now possible to run a specific Analytics Edge query from a button on your worksheet (the Analytics Edge Core Add-in must be installed). This opens the door to interactive refreshes  and improved user experiences.

Starting with a workbook containing an Analytics Edge query, first select the cell containing the query. A comment box should pop up containing the name of the Analytics Edge Query (e.g. Sheet1!$A$1):

CAUTION: This will ONLY work on worksheets with names that do NOT include spaces.

Add a Form Control Button to your worksheet and draw the button on your worksheet.

add-a-button

When prompted for the Macro name, enter AnalyticsEdge.RunMacro. Click OK.

assign-macro

With the button still selected (right click on the button if you need to select it), change the button name to match the name of the query to be run when you click the button (remove any ! or $ characters, so Report!$C$15 becomes ReportC15). You enter the button name in the Name box, located to the left of the formula bar:

That’s it! Now you can just click the button to run the Analytics Edge query!

New for v8.2: Now you can refresh all queries and macros simply by naming the button “RefreshAll”!

Updated for v8.2.