Use AppActivate to make the selected Window Active
Set WshShell = WScript.CreateObject("WScript.Shell") WshShell.Run "calc" WScript.Sleep 100 WshShell.AppActivate "Calculator"
This example runs the Windows Calculator and makes the Windows Calculator the active Window. The Application being made active should have the full title bar name in your script. For example notepad should read:
WshShell.AppActivate "Untitled - Notepad"
For more information about VBScript, check out our VBScript Training Videos