VBA (Excel 2007) - 怎样才能|使用 Onkey 覆盖默认快捷方式行为
Excel 2007 与 Excel 2003 不同,它使用 Alt+C、Alt+S、 等热键Alt+V 就像特定功能的快捷方式。
所以如果我在 VBA 模块中使用
Application.OnKey("%C","ProcAltC")
它就不起作用。换句话说,按 Alt+C 不会调用“ProcAltC”例程。
如何覆盖默认快捷方式行为才能成功使用 OnKey
?
Excel 2007, different from Excel 2003, uses hotkeys like Alt+C, Alt+S, Alt+V like shortcuts to specific features.
So if I use in a VBA module
Application.OnKey("%C","ProcAltC")
It doesn't work. In other words, pressing Alt+C doesn't call "ProcAltC" routine.
How can I override that default shortcut behavior in order to use OnKey
successfully?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
在 Office 2010 中,我可以通过... Alt+C 和 Alt+S 生成
操作>Alt+V 是一个不同的故事。如果您绝对必须使用像 Alt+V 这样的组合,则必须编译并使用操作系统系统挂钩。
In Office 2010 I can produce an action on Alt+C and Alt+S by...
Alt+V is a different story. If you absolutely must use combinations like Alt+V, you're going to have to compile and employ an OS system hook.