community
cancel
Showing results for 
Search instead for 
Did you mean: 

Alteryx designer Discussions

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

How to run a vba macro( protected by password) in Alteryx

Highlighted
Hello, I would like to ask if there is any way to run a vba macro(protected by password, because there are the credentials from the database), in this workbook the user must input two dates(from - to). I would like to run this code in alteryx and input these dates in alteryx as well. Really appreciate if anyone can help me on it. Thanks!!
Alteryx Certified Partner

Hi @andressaolisi 

 

One answer would be to rebuild that VBA process in Alteryx since it's better

 

A more direct answer would be that you'll need to use Run Command to call an external programs like wscript.exe to execute that VBA/VBS. Here's a post that should be helpful with the details of that:

 

https://community.alteryx.com/t5/Alteryx-Designer-Discussions/Call-VBA-macro-from-Alteryx/td-p/46062...

Hi Charlie, thanks for you reply! I'm trying to run the following VBscript, however it is not updating (seems that its not running my macro)... I don't know if I wrote anything wrong or if I'm not able to run since this spreadsheet is protect (I know the name of the macro because I asked the guys from Technology team)... thank you very much! Sub a() dim objExcel set objExcel = CreateObject("Excel.Application") objExcel.Visible = TRUE objExcel.DisplayAlerts = False Path1="(...)spreadsheet.xlsm" objExcel.Workbooks.Open Path1 objExcel.Run("spreadsheet!Macro") objWorkbook.Saved=True objExcel.quit end sub
Labels