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


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

© Copyright SS64.com 1999-2015
Some rights reserved