Option Explicit 'define variables to send (could also use an array) Dim var1 As String Dim var2 As String Dim var3 As String Dim var4 As String Dim var5 As String Dim sVarTextFilename As String Sub Main 'set-up the variables var1 = "1" var2 = "Oranges" var3 = "20190708" var4 = "Test" var5 = "Script" 'call the file that writes the variables to a text file and returns the filename and path sVarTextFilename = writeVariablesToTextFile() 'call the second IDEAScript and send the filename that holds the variables Client.RunIDEAScriptEX "Macros.ILB\Example Macro to Get Variables.iss", sVarTextFilename, "", "", "" End Sub Function writeVariablesToTextFile() As String Const ForReading = 1 Const ForWriting = 2 Dim fso As Object Dim f As Object Dim sTextFilename As String 'set the default file location and name sTextFilename = Client.WorkingDirectory() & "var test file.txt" 'The Scripting.FileSystemObject allows us to access the file system to write and read files Set fso = CreateObject("Scripting.FileSystemObject") 'Create the new file if it doesn't exist and write the variables to it. Set f = fso.OpenTextFile(sTextFilename, ForWriting, True) f.writeline var1 f.writeline var2 f.writeline var3 f.writeline var4 f.writeline var5 f.close Set f = Nothing Set fso = Nothing writeVariablesToTextFile = sTextFilename End Function