sendkey problem

  • Thread starter Thread starter kaiser
  • Start date Start date
K

kaiser

Hello

i know that sendkey is to be avoided but just a quick question.

I have a program that I am trying to alt tab to (NewProgram), Ctrl C
to get info, then alt tab back to excel and paste in range a1.

The problem is that NewProgram doesnt support vba so the line

Application.SendKeys ("%{TAB}^c%{TAB}")

only alt tabs to NewProgram but doesnt copy or tab back to excel
because NewProgram doesnt support vba.

Any simple way around this?

Thanks
 
The NewApp does not need the understand VBA for the Sendkeys to <in theory>
work.
However, as the {%Tab} brings up the windows selection dialog, you still
have to move as required with future Tabs. Also it there is no telling where
the copy is being directed in the selected app..
Depending on the nature of the NewApp, this may prove difficult to
impossible.

Look into AppActivate, GetObject and possible Shell, DDE depending what the
destination app supports.

NickHK
 
The NewApp does not need the understand VBA for the Sendkeys to <in theory>
work.
However, as the {%Tab} brings up the windows selection dialog, you still
have to move as required with future Tabs. Also it there is no telling where
the copy is being directed in the selected app..
Depending on the nature of the NewApp, this may prove difficult to
impossible.

Look into AppActivate, GetObject and possible Shell, DDE depending what the
destination app supports.

NickHK













- Show quoted text -

Thanks for the reply - no luck with those options..thanks anyway
 
Back
Top