Application Must Be in Open Window Before Executing SEND.KEYS

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("CALC.EXE",1)

to open the Calculator in a normal window, or

   B4: =EXEC("CALC.EXE",3)

to open the Calculator in a maximized window.

REFERENCES

"Microsoft Excel Function Reference," version 3.0, pages 70-71 and 214-215


KBCategory: kbother
KBSubcategory:

Additional reference words: noupd


THE INFORMATION PROVIDED IN THE MICROSOFT KNOWLEDGE BASE IS PROVIDED "AS IS" WITHOUT WARRANTY OF ANY KIND. MICROSOFT DISCLAIMS ALL WARRANTIES, EITHER EXPRESS OR IMPLIED, INCLUDING THE WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. IN NO EVENT SHALL MICROSOFT CORPORATION OR ITS SUPPLIERS BE LIABLE FOR ANY DAMAGES WHATSOEVER INCLUDING DIRECT, INDIRECT, INCIDENTAL, CONSEQUENTIAL, LOSS OF BUSINESS PROFITS OR SPECIAL DAMAGES, EVEN IF MICROSOFT CORPORATION OR ITS SUPPLIERS HAVE BEEN ADVISED OF THE POSSIBILITY OF SUCH DAMAGES. SOME STATES DO NOT ALLOW THE EXCLUSION OR LIMITATION OF LIABILITY FOR CONSEQUENTIAL OR INCIDENTAL DAMAGES SO THE FOREGOING LIMITATION MAY NOT APPLY.

Last reviewed: November 2, 1994
© 1998 Microsoft Corporation. All rights reserved. Terms of Use.