Activate a running command.

     objShell.AppActivate strApplicationTitle

   objShell   A WScript.Shell object

   strApplicationTitle  The name of the Application to activate

The AppActivate method tries to activate an application whose title is the nearest match to strApplicationTitle.


Activate Notepad (assuming Notepad is already running).

Set objShell = CreateObject("WScript.Shell")
objShell.AppActivate "notepad"

“The odds against there being a bomb on a plane are a million to one, and against two bombs a million times a million to one. Next time you fly, cut the odds and take a bomb” ~ Benny Hill

Related VBScript commands

Command, run command - .Run
Equivalent Windows CMD command: START - Start a program or command.

Copyright © 1999-2023 SS64.com
Some rights reserved