Article ID: 87773 - Last Review: December 12, 2003 - Revision: 2.0 PRB: SendKeys May Return Illegal Function Call ErrorThis article was previously published under Q87773 On This PageSYMPTOMS
The SendKeys statement reports the error "Illegal function call" when
its argument contains an incorrectly formatted string. This article
describes specific circumstances that cause this error, and contains
a code example that shows how to send any string with SendKeys.
CAUSE
The following characters have special meaning to the SendKeys statement:
+ ^ % ~ ( ) [ ] { }
RESOLUTION
To prevent the SendKeys statement from interpreting a character,
enclose the character in braces {}. For example, to send the string
The interest rate is 5% (annually).
Use the following SendKeys syntax:
MORE INFORMATIONStep-by-Step ExampleThe following example demonstrates how to use the SendKeys statement to send strings that would normally cause an "Illegal function call" error:
REFERENCES
"Microsoft Visual Basic: Language Reference," version 1.0, pages 283-284
APPLIES TO
| Article Translations
|

Back to the top
