On Apr 6, 6:51 am, "Prometheus" <prometheus...@excite.com.au> wrote:
> G'day all,
>
> Is there a way to use and excel macro to activate an open window (non-
> excel based) and send keystrokes to it?
>
> For Example I need the macro to activate "TTWin Session 1" window open
> on my screen and send various keystrokes in order to navigate through
> the terminal.
>
> Is it possible and if so how?
>
> Cheers all....
This is possible; however, SendKeys should be a last resort. If the
system has DDE (Dynamic Data Exchange) then DDE would be a better
alternative (search VBE Help for dde). Otherwise, in short the
following should work (it uses SendKeys).
AppActivate "TTWin Session 1"
Application.SendKeys "c", True
'search VBE Help for SendKeys to see how to use all keyboard
combinations.
Matt
|