title: Control VBScript using VBA
body: <p>To achieve multithreading, I'm writing using VBA to construct VBScript code (<code>VBStr</code>) and write to file on-the-fly, before launching these helper scripts asynchonously:</p>
  
  <pre><code>Dim VBFile As Object
  Dim VBPath As String
  VBPath = CurrentProject.Path &amp; "\" &amp; GUID() &amp; ".vbs"
  Set VBFile = CreateObject("Scripting.FileSystemObject").CreateTextFile(VBPath)
  VBFile.WriteLine VBStr
  VBFile.Close
  
  Dim Shell As Object
  Set Shell = CreateObject("Wscript.Shell")
  
  Shell.Run """" &amp; VBPath &amp; """"
  </code></pre>
  
  <p>However, how to control these scripts back in VBA? I can't seem to get a handle or reference to them. Say I want to terminate hung/stalled scripts after 60secs - how to do this?</p>