# Macro

Macros are used to record the set of actions, save, run. Macros are used to save time on repetitive tasks when we do not want to do the same task every time. Macros can make wonders and we want you to experience those wonders with our Valorx Fusion.

To get started with this follow the below steps.

Open an **Excel**, click **Start** from Valorx Fusion Ribbon.

<div align="left"><img src="https://2472585788-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F-MFqFFf4143HS0_Wagnz%2Fuploads%2FY1Sr0XbxamKAUV8BSFL8%2FApp%20store.png?alt=media&#x26;token=77ab2544-646e-41cb-897e-54fae110c593" alt="" width="563"></div>

Follow the instruction provided to view the Developer option on the ribbon. Developer option is used to write macro in Excel

* Select **File** from the ribbon and click on **Options**.
* Select **Customize** the Ribbon from **Excel Options**.
* Select Developer and click **OK**.

![](https://2472585788-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F-MFqFFf4143HS0_Wagnz%2Fuploads%2FiFVHD1vKfsd6ttmLRUA8%2FMacro.png?alt=media\&token=119b87f6-8dc6-4919-bd58-10d1ca258620)

Developer button will now show up on the Valorx Ribbon.

<div align="left"><img src="https://2472585788-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F-MFqFFf4143HS0_Wagnz%2Fuploads%2FtaHznl78dIPTpcdHicoM%2FMacro%201.png?alt=media&#x26;token=1079fd2f-a9e0-410b-92b6-e9bf75f050e8" alt="" width="563"></div>

Open an app and click on **Tasks** and select Macros now click on **New Macro Task**. Below validation message will be displayed when there is no macro create on workbook or when Valorx Fusion is unable to access the macro settings. Follow the instruction provided under Information.

![](https://2472585788-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F-MFqFFf4143HS0_Wagnz%2Fuploads%2FrphLwTN9gRDzAklN1UVn%2FGoogle%20Macro.png?alt=media\&token=d15dbac4-1d1c-4c49-b635-f08b7f2e5e42)

To get started with creating a macro follow the below steps.

* Select **Developer** from **Valorx Fusion Ribbon**.
* Click **Macros** and a dialog box will open.

![](https://2472585788-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F-MFqFFf4143HS0_Wagnz%2Fuploads%2FBFNO3uWRUGvQnUqO8dSg%2FMacro%202.png?alt=media\&token=af79a76f-7547-44cf-9dcb-43ccd43cc46e)

Provide the name of the macro under **Macro Name** and click **Create**.

<div align="left"><img src="https://2472585788-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F-MFqFFf4143HS0_Wagnz%2Fuploads%2FhzajJcaEEsV93Ql7VTFp%2FMacro%203.png?alt=media&#x26;token=1bbcaa70-aa22-4bda-a599-87aae8c365d0" alt="" width="375"></div>

Now, write the macro in the provided box. Macro needs to be written between the "Sub" and "End Sub".

![](https://2472585788-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F-MFqFFf4143HS0_Wagnz%2Fuploads%2FnmSgOyBklIhgqSsFwxRt%2FMicrosoftTeams-image%20\(15\).png?alt=media\&token=fe43dfae-39e5-4dae-ad9d-52708e101de7)

Once the macro is created now open a **New Macro Task** and provide the name of the Macro. Designers can choose the macros from Available Macros. Macro Task allows Valorx Fusion App to execute VBA hosted in the Excel file.

<div align="left"><img src="https://2472585788-files.gitbook.io/~/files/v0/b/gitbook-legacy-files/o/assets%2F-MFqFFf4143HS0_Wagnz%2F-MGMFzuafvexxmmw61dk%2F-MGMXqKxWJQk3OF0-Eut%2Fimage.png?alt=media&#x26;token=a63734de-a8a9-44bf-a0fc-8b635fa37c69" alt="" width="188"></div>

{% hint style="info" %}
Designers also can record the macro by clicking on Record Macro.
{% endhint %}
