ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Programming (https://www.excelbanter.com/excel-programming/)
-   -   sendkey problem (https://www.excelbanter.com/excel-programming/387126-sendkey-problem.html)

kaiser

sendkey problem
 
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


NickHK

sendkey problem
 
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

"kaiser" wrote in message
oups.com...
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




kaiser

sendkey problem
 
On Apr 10, 3:45 pm, "NickHK" wrote:
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

"kaiser" wrote in message

oups.com...



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- Hide quoted text -


- Show quoted text -


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



All times are GMT +1. The time now is 11:28 AM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
ExcelBanter.com