To achieve multithreading, I write using VBA to create VBScript code ( VBStr ) and write to a file on the fly, before running these helper scripts asynchronously:
Dim VBFile As Object Dim VBPath As String VBPath = CurrentProject.Path & "\" & GUID() & ".vbs" Set VBFile = CreateObject("Scripting.FileSystemObject").CreateTextFile(VBPath) VBFile.WriteLine VBStr VBFile.Close Dim Shell As Object Set Shell = CreateObject("Wscript.Shell") Shell.Run """" & VBPath & """"
However, how to manage these scripts in VBA? I can't seem to find a pen or a link to them. Let's say I want to stop hanging / stalled scripts after 60 seconds - how to do this?
source share