如何在Excel中捕获Windows菜单键(通过按键调用的右键菜单) [英] How to capture Windows Menu Key in Excel (the right-click menu called via key press)

查看:145
本文介绍了如何在Excel中捕获Windows菜单键(通过按键调用的右键菜单)的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

您好,


我试图找到一种方法来捕获用户在Excel工作表中按Windows菜单键的事件。


我在工作表上捕获了右键单击事件,没问题。在这种情况下,我显示自己的菜单,而不是"单元格"。菜单。但是用户仍然可以按下菜单键和默认的"单元"按钮。菜单将出现。


我不想修改单元格菜单,因为我想同时使用我的自定义菜单和单元格菜单。我只想控制单元格菜单的显示。


Application.Onkey似乎没有提供此密钥的密钥代码(例如{MENU})。


任何想法?


非常感谢...

解决方案

使用KeyCode 93

Hello,

I am trying to find a way to capture the event of a user pressing the Windows Menu Key in an Excel Worksheet.

I have the right-click event captured on the worksheet, no problem. In that case, I display my own menu, rather than the "Cell" menu. But the user can still press the menu key and the default "Cell" menu will appear.

I do not want to modify the cell menu, since I would like to work with both, my custom menu and the cell menu. I just want to control the display of the cell menu.

Application.Onkey does not seem to offer a keycode for this key (e.g. such as {MENU}).

Any ideas?

Many thanks...

解决方案

Use KeyCode 93


这篇关于如何在Excel中捕获Windows菜单键(通过按键调用的右键菜单)的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆