sendkey problem

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
 
N

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
 
K

kaiser

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
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top