Home |
Search |
Today's Posts |
#1
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
In case anyone is interested in the answer I figured it out. In microsoft
excel's help on sendkeys you'll see the following code: Dim ReturnValue, I ReturnValue = Shell("CALC.EXE", 1) ' Run Calculator. AppActivate ReturnValue ' Activate the Calculator. For I = 1 To 100 ' Set up counting loop. SendKeys I & "{+}", True ' Send keystrokes to Calculator Next I ' to add each value of I. SendKeys "=", True ' Get grand total. SendKeys "%{F4}", True ' Send ALT+F4 to close Calculator Make sure caculator is running, comment the second line "RetrunValue..." and replace the third with AppActivate "Calculator". Right in front of my face......!!!!!!!!! "Matt" wrote: Hi All, I would like to send key strokes from excel to an application that is already open (I don't want to open a new instance of it, as shown is Sendkey example of the calculator). How do I get focus to the application? Any help would be appreciated. Thanks, Matt |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
Excel 2007 Macro/VB Question DDE Question | Excel Worksheet Functions | |||
where can I see my question and answer? Yesterday I ask a question | Excel Discussion (Misc queries) | |||
sendkey help needed | Excel Discussion (Misc queries) | |||
Newbie Question - Subtraction Formula Question | Excel Discussion (Misc queries) | |||
using sendkey to enter vbe password in Excel 2000 | Excel Programming |