Alteryx Designer Desktop Discussions

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

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

andressaolisi
6 - Meteoroid
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!!
2 REPLIES 2
CharlieS
17 - Castor
17 - Castor

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...

andressaolisi
6 - Meteoroid
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