New Macro

Object to create a VBA macro.

Settings

This object depends either on the "New Excel" or on the "Open Excel" objects to work.

Field

Descriptive

Title

Object Title

Object Identifier Name

Singular object name of the object to create the macro in Excel

Select Main Object

Option to select an Excel sheet

Macro Name

Macro name

Run Macro

Execute the created macro

Select Cells

Select the cells for the macro execution

Starting Cell

Initial cell of the selection

Final Cell

Final selection cell

Script

VBA Script

Example

To create a new macro in an Excel spreadsheet file you need to follow a few steps with a pre-existing file:

1 - Select the "Open Excel" object from the "Excel" menu and drag it to your working area.

  • First you must define a unique name for the object in the "Object Identifier Name" field, inform the complete directory containing the name and the extension of the file and then set a password if it is required.

2 - Then you should select the "New Macro" object in the "Excel" menu, define a unique name for the object in the "Object Identifier Name" field, select the main object defined when opening the Excel file, define the macro name, select the "Run Macro" option and then write the VBA script.

  • Caso selecionada a opção "Executar Macro", será exibida a opção "Selecionar Células". Ao selecionar essa opção, será necessário informar o valor para a "Célula Inicial" e "Célula Final" para a execução da macro. - If you select the "Run Macro" option, the "Select Cells" option will be displayed. When you select this option, you will need to enter the values for the "Starting Cell" and the "Final Cell" fields.

Last updated

Was this helpful?