The information in this article applies to:
SUMMARY
You can use the OnKey method in conjunction with SendKeys to allow a Visual
Basic, Applications Edition, macro to send keystrokes to Microsoft Excel as
if the user had entered information.
MORE INFORMATIONMicrosoft provides examples of Visual Basic procedures for illustration only, without warranty either expressed or implied, including but not limited to the implied warranties of merchantability and/or fitness for a particular purpose. This Visual Basic procedure is provided 'as is' and Microsoft does not guarantee that it can be used in all situations. Microsoft does not support modifications of this procedure to suit customer requirements for a particular purpose.
The Continue macro is important. Without a second argument, the OnKey
method undefines the key indicated, restoring it to its previous function.
If this is not done, any time the user presses F13 (and a macro isn't
running), the macro Continue will begin execution.
REFERENCESFor information about using the ONKEY macro function in earlier versions of Microsoft Excel, query on the following article in the Microsoft Knowledge Base: Q58951 ON.KEY() in Excel Additional query words:
Keywords : kbprg xlwin |
Last Reviewed: October 18, 1999 © 2000 Microsoft Corporation. All rights reserved. Terms of Use. |