开发者

How can I make the Excel cell menu update when the keyboard's context menu key is pressed

At the moment, I have code that runs in the Application's SheetBeforeRightClick event, but I've found that this code doesn't run when I press the keybo开发者_StackOverfloward's Context Menu key instead of using the right mouse button, which means that I get the wrong menu.

I could use the SheetSelectionChange event instead, but I'd imagine this would be quite error prone. Is there a more elegant way of doing it?


There is a BeforeContextMenu event you can use.
http://msdn.microsoft.com/en-us/library/aa193082(office.11).aspx
It should catch both the right click and the keyboard key.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜