Microsoft KB Archive/75859

{| = Application Must Be in Open Window Before Executing SEND.KEYS =
 * width="100%"|

Last reviewed: November 2, 1994

Article ID: Q75859

SUMMARY
When executing a SEND.KEYS command from a macro to an application opened with an EXEC command, the application must be in a normal or maximized window.

MORE INFORMATION
On page 215 of the Microsoft Excel Function Reference, there is an example of a macro using the SEND.KEYS command. The example is incorrect because the EXEC command opens the Calculator application in a minimized window. If this macro is executed, you will receive a macro error at cell B10 because the Copy command issued to the Calculator by the SEND.KEYS command never executes.

To correct the problem, you can replace the command in cell B4 with

B4: =EXEC(&quot;CALC.EXE&quot;,1) to open the Calculator in a normal window, or  B4: =EXEC(&quot;CALC.EXE&quot;,3) to open the Calculator in a maximized window.