Showing results for 
Search instead for 
Did you mean: 

Alteryx designer Discussions

Find answers, ask questions, and share expertise about Alteryx Designer.

VBA Macro Implementation in Alteryx


I have a simple VBA macro that I want to include in the Alteryx workflow.

Basically I want to add this macro to the Alteryx excel output file.

How do I connect the macro?


Is it suggested to add an alteryx macro or how do I go ahead in implementing the VBA macro in Alteryx workflow?



Hi @dkchandana3 


I don't think it's possible to add a macro to an excel file using Alteryx.  What you can do is have a an excel template file that already has the macro embedded and use Alteryx to fill in the data sheets.




Hello @dkchandana3,


This is possible to do through the Run Command tool. You will have to learn some basic VB code to create the script that would populate the Run Command tool. Here is a good link to get you started: vbscript


Also here is a good link for the Run command tool: RunCommand


Once you have the script that would run the macro, you would just need to incorporate the script into the workflow that you are using to update the data. Example:


VBScript Run Command.PNG

I was able to get this to work before where the data populated and then the macro updated the report and sent an email all in one workflow.


hi @cplewis90 


I don't think that @dkchandana3 wants to run a macro, though your procedure is perfect for that.  I think he wants to use Alteryx add the macro code to a new workbook.




Hello @dani,


I misread the question. @dkchandana3  You should still be able to leverage the Run Command tool and add the macro to the new workbook via VBScript. This link may be a useful start: vbscript


Hi @cplewis90


Would you mind attaching the workflow you are displaying in your comment? I would like to see what is in the Command Tool itself.


Thank you,

Emanuel R

SAP using VB scripting for macros: I'm looking to run a VB script to ask SAP to run a query, save a file, and then use that file in the workflow.  I can't seem to nail the sequencing down.  I'm thinking I may need to create a macro to run the VB scripting and use that in the main.  Any thoughts?  Recommendations?