Microsoft KB Archive/67578

{|
 * width="100%"|

Excel: SEND.KEYS Not Executing Correct Menu Commands

 * }

-

The information in this article applies to:


 * Microsoft Excel for Windows, versions 2.x, 3.0, 4.0, 5.0
 * Microsoft Excel for OS/2, versions 2.2, 3.0

-

SUMMARY
When a SEND.KEYS function in a Microsoft Excel macro is executing an incorrect menu command, check the case of the letters that are being sent by the function. If the letter for the desired menu is capitalized, the SEND.KEYS function will execute it as a SHIFT+ keystroke, resulting in the wrong menu option.

MORE INFORMATION
When using a line such as

  =SEND.KEYS(&quot;%(F)(C)&quot;)

in a Microsoft Excel macro to execute the Close command from the File menu, even though a SHIFT keystroke is not entered in the function, the function will still execute SHIFT+ALT+File, generating the File Close All command. Because the Close and the Close All commands can be called by the letter &quot;c&quot;, the File Close All command will be executed rather than the desired File Close command.

(Note: this is also true for version 5.0 macro sheets, but not modules.)

Additional query words: 2.0 2.00 2.01 2.1 2.10 2.2 2.20 2.21 3.0 4.0 5.0

Keywords :

Version :

Platform :

Issue type :

Technology :