{CLEAR} Keystroke Is Supported Using SendKeys Command

Last reviewed: July 29, 1997
Article ID: Q125899
The information in this article applies to:
  • Microsoft Visual Basic Programming System, Applications Edition, version 1.0
  • Microsoft Excel for Windows, versions 5.0, 5.0c
  • Microsoft Project for Windows, version 4.0

SUMMARY

The CLEAR keystroke is supported using the SendKeys statement or SendKeys method, even though this key is not included in the list of keys available in the Visual Basic Reference. To send the CLEAR keystroke using the SendKeys command in a Visual Basic, Applications Edition, procedure, use the key code {CLEAR} as in the following examples:

   SendKeys "{CLEAR}"

   Application.SendKeys "{CLEAR}"

Note that you cannot use the SendKeys method (Application.SendKeys command) in Microsoft Project.

MORE INFORMATION

The {CLEAR} key code is not documented in the Visual Basic Reference because the CLEAR key no longer exists on most keyboards. However, this keystroke is supported by the SendKeys command. If your keyboard does not have a CLEAR key, using the SendKeys command with the {CLEAR} key code does not have any effect.

Note that all of the named keys (except {Clear}) in the Visual Basic, Standard Edition, version 3.0 Help file are documented in the Visual Basic Reference.

REFERENCES

For more information about the SendKeys Statement or the SendKeys Method, choose the Search button in the Visual Basic Reference and type:

   SendKeys
Keywords          : kbcode kbprg
Version           : 1.00
Platform          : WINDOWS


================================================================================


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: July 29, 1997
© 1998 Microsoft Corporation. All rights reserved. Terms of Use.