Skip to content

ExecuteMacro.cs

Avrigeanu Laurian edited this page Apr 12, 2023 · 1 revision

ExecuteMacro(string macroName)

Parameters

  • macroName : The name of the macro to execute.

Returns

This method does not return anything.

Remarks

This method is used to execute a macro in the current workbook. The macroName parameter specifies the name of the macro to execute. The method uses reflection to invoke the Run method of the workbook object, passing in the macroName parameter as an argument.

It is important to note that the macroName parameter must match the name of a valid macro in the workbook, or else an exception will be thrown. Additionally, this method assumes that the workbook object has already been instantiated and set to the workbook variable.

Clone this wiki locally