Free Trial

Alteryx Designer Desktop Discussions

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

Run VBA in Alteryx

hzpetro
7 - Meteor

HI..

 

I have a VBA code that will pick up from 2 tab in the sheet and doing some calculation to calculate the BOM material cost. I have tried the link that been provided in previous discussion but it doesnt work since the data is too large and the csript is hang. Is there any possible way that I can write the code in the Alteryx and use the input file from the gdrive and the output also is in the gdrive. Pls help to advise. Thanks

3 REPLIES 3
simonaubert_bd
13 - Pulsar

Hello @hzpetro 

Sadly there is no way to use directly VBA in Alteryx.However, you can try both solutions :
-reproducing manually your code with Alteryx tools
-using generative AI to transform your VBA in Python

https://help.alteryx.com/current/en/designer/tools/developer/python-tool.html

 

-using a cmd tool to execute vba but in your case, it won't help
https://community.alteryx.com/t5/Alteryx-Designer-Desktop-Discussions/Running-VBA-Script-in-workflow...


Best regards,
Simon

hzpetro
7 - Meteor

Hi @simonaubert_bd 

 

Let me try with both of your suggestion. Thanks for the help and advise. Appreciate it

goyolix666
7 - Meteor

Sub RenameSheet()
Dim ws As Worksheet
Dim newSheetName As String

' Set the worksheet you want to rename
Set ws = ThisWorkbook.Sheets("Sheet1") ' Change "Sheet1" to your sheet name

' Set the new sheet name
newSheetName = "NewSheetName" ' Change this to your desired sheet name

' Rename the worksheet
On Error Resume Next ' Ignore error if the name already exists
ws.Name = newSheetName
If Err.Number <> 0 Then
MsgBox "A sheet with the name " & newSheetName & " already exists or the name is invalid.", vbExclamation
Else
MsgBox "Worksheet renamed to " & newSheetName
End If
On Error GoTo 0 ' Resume normal error handling
End Sub

Labels
Top Solution Authors