I want to be able to load a large number of files into an Alteryx workflow. However, they are currently in 1904 date format and I get an error when I try to input them. To get around this, I've created a macro in VBA to turn off 1904 dates for all files in a given folder. I'd like to be able to use this macro as an event at the beginning of my workflow run so that the files will load without an error. However, Alteryx events seems to only want to run Excel macros as .vbs file types, and VBA macros save as .bas types. Can I run a standard VBA macro via Alteryx events or do I need to convert to a VBScript?
In case it helps, my code is as below:
Sub OpenFiles()
Dim MyFolder As String
Dim MyFile As String
MyFolder = "C:\Users\username\Documents\1904 Date Macro"
MyFile = Dir(MyFolder & "\*.xlsx")
Do While MyFile <> ""
Workbooks.Open fileName:=MyFolder & "\" & MyFile
ActiveWorkbook.Date1904 = False
ActiveWorkbook.Close SaveChanges:=True
MyFile = Dir
Loop
End Sub