Skip to content


Calling Excel Add-in "Run Map" from a Macro

Aaron asked 7 years ago
I’d like to provide a Macro from my Excel spreadsheet to do some pre-processing and then execute the “Run Map” button from the Excel 2013 Add-in Ribbon. I am unable to find a way to call “Run Map” programatically. Is there a method I should be using to accomplish this?
patrick answered 7 years ago
Good question – not sure if it’ll work.
I’d try this but it seems my Addin isn’t working at the moment to test with.
But as you are recording the macro to do whatever, in the macro choose the Run Map button.
If it records, then you have your solution.
However if not, then you are stuck and that would have to be a manual process for your user.
Aaron replied 7 years ago

Excel’s “Record Macro” feature is not aware of the Ribbon’s Add-in button.

Apparently Add-ins can be called programmatically, if (1) they are build to be called by VBA, and (2) if you know the name of the function to call.

It doesn’t look difficult, it just looks like the developer must be intentional to expose the function name:

Chris Hanson Staff answered 7 years ago
If you wanted to replicate the add-in functionality so you could call it from a macro I would use the code from one of our excel templates. We have a generic excel template on our site that has the unlocked VBA code that will call our web service in a similar manner to the add-in.
You could take that code and add it to your workbook, then setup whatever process you wanted to run and have it call that at the end.
Lewis replied 5 years ago

If you call the web service, as you are suggesting, will you still get the error report? The benefit of using the excel add in is the ability to validate the import before, which brings back the row that failed. Can that still be done when you call the web service from excel?

Matt M replied 4 years ago

Chris – I know this is an old thread but is the template with the accessible macro still available? All the template I have opened are password protected. Thanks!

If you would like to submit an answer or comment, please sign in to the eOne portal.