Run-time Error Using SendKeys to Send Right Brace Character |
Q114343
If you use the SendKeys command to send the right brace character "}"in a Visual Basic, Applications Edition procedure, you receive the following error message:
Note that this problem does not occur if you use the SendKeys command to send the left brace character "{".Run-time error '5':
Invalid procedure call
To work around this problem in Microsoft Excel, you can use the SendKeys method as in the following example:
Application.SendKeys "{}}" -or-
Application.SendKeys "{" & chr$(125) & "}"
Note that you cannot use the SendKeys method (Application.SendKeys) in
Microsoft Project.
Microsoft has confirmed this to be a problem in the Microsoft products listed at the beginning of this article. We are researching this problem and will post new information here in the Microsoft Knowledge Base as it becomes available.
The error message described above appears if you use either of the following methods in a Visual Basic, Applicaitons Edition procedure to send this character:
SendKeys "{}}" -or-
SendKeys "{" & chr$(125) & "}"
NOTE: The following equivalent code works in Visual Basic for Windows
Programming System, version 3.0.
Sub Form_Click ()
SendKeys "{}}"
End Sub
For more information about the SendKeys Statement or the SendKeys Method, choose the Search button in the Visual Basic Reference and type:
SendKeys
Additional query words:
Keywords :
Issue type : kbbug
Technology :
|
Last Reviewed: January 15, 2001 © 2001 Microsoft Corporation. All rights reserved. Terms of Use. |