Excel: SEND.KEYS() Not Executing Correct Menu Commands

ID: Q67578


The information in this article applies to:


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+<the menu letter> keystroke, resulting in the wrong menu option.


MORE INFORMATION

When using a line such as


   =SEND.KEYS("%(F)(C)") 


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 "c", 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        : 

Last Reviewed: March 21, 1999