0

I have a 3rd party add in in Excel, and I'd like to call the "Refresh" function from that add in from an Usual VBA code. (the record function didn't work)

I saw I can call the add in trough the Application.Run(...) as explained here: How do I call an xll addin function from vba?

However I am a bit stuck because I am not sure how to identify where my addin is located, and even then, in the file I suspect it is, there are tons of files .dll...

How can I know what to put in the application run?

Laketi
  • 1
  • 3

1 Answers1

0

Application.Run will run any function with a matching name defined in a regular module in any open workbook within the Excel application, including open Excel add-ins. You can prefix the function name with the workbook name and an exclamation mark to narrow the search to a particular workbook and you can pass in the required parameters, e.g.

Application.Run("AddinWorkbookName.xlam!FunctionName", Parameter1, Parameter2)

Obviously, you need to make sure that the workbook (or add-in) you're calling to is open in Excel. You can see the list of all open workbooks in the Project Explorer in the VBE.

igorsp7
  • 441
  • 2
  • 4