The information in this article applies to:
SYMPTOMSIn Microsoft Excel, if you use both the SendKeys statement and the Application.SendKeys method in a Visual Basic procedure, the order in which the keystrokes run may be different than the order of the keystroke commands in your procedure. CAUSEIn a Visual Basic procedure, the Application.SendKeys method is run before the SendKeys statement. WORKAROUND
To ensure that the keystrokes you send using SendKeys in a Visual
Basic procedure run in the correct order, do one of the following:
-or- MORE INFORMATIONThe SendKeys command is available both as a built-in Visual Basic statement, and as a method of the Microsoft Excel Application object. You can use either SendKeys command to send keystrokes to the active window. This command is useful when you want to send commands to another application that does not support linking, embedding, OLE Automation, or dynamic data exchange (DDE). The two commands provide the same general functionality, one exception being the order in which they are run when used in the same procedure as described above. REFERENCES
"Visual Basic User's Guide," version 5.0, pages 214-215
SendKeys Additional query words: 8.00 97
Keywords : kbprg kbdta KbVBA |
Last Reviewed: October 25, 1999 © 2000 Microsoft Corporation. All rights reserved. Terms of Use. |