The information in this article applies to:
SUMMARY
In some situations, the Microsoft Excel SEND.KEYS function may
not work as desired. For example, if you have several sequences of
keys that you would like to send to Microsoft Excel, and each must
be completed before the next can be sent, SEND.KEYS may not
work as anticipated.
WorkaroundTo work around this problem, you must temporarily halt the macro to process the keys and resume at the next line after an appropriate time delay.MORE INFORMATION
When this situation occurs, use the ON.TIME function in conjunction
with the HALT function to force Microsoft Excel to process each text
string before moving on to the next. For example, if String1 must be
processed before String2, use the following format:
In the above example, the ON.TIME function tells Microsoft Excel to wait for about one second and then resume execution at the point designated (Macro1.xlm!R5C1). The effect is that the macro temporarily halts, allowing the first sequence of keys sent to Microsoft Excel to be processed. After allowing Microsoft Excel enough time to process those keys (in this case, one second), the macro starts back up at the point designated and sends the second string. Note: the information above also applies to version 5.0 only when using version 4.0 macro language. REFERENCES
"Function Reference," version 3.0, page 168 Additional query words: 2.0 2.00 2.01 2.1 2.10 2.2 2.20 2.21 3.0 4.0 4.0a 4.00a
Keywords : |
Last Reviewed: March 16, 1999 © 2000 Microsoft Corporation. All rights reserved. Terms of Use. |