You can use a Microsoft Excel file with defined marcos and filled with collected data as a template file. Before you save the template, the MRE can automatically call the template and checks for defined marcos. The MRE then calls the macros and saves the template.
In order for the MRE to call a macro, use an underscore at the beginning of your macro name. The MRE calls macros entered as xlFunction, which is a constant of values equal to 1.
Note: The MRE cannot call macros that take parameters.
To define marcos for the MRE complete the following steps:
- To open Visual Basic Editor, click .
- Click ThisWorkbook.
- In the Cartel1 - ThisWorkbook window, from the Workbook list, click Workbook_Open.
- Enter the following
code:
Application.Names.Add _ Name:="_MacroToExport", _ RefersTo:="nullSheet!a1", _ MacroType:=1
Note: The underscore before the name value prevents an exception. - Repeat step 4, to add more than one macro.