如何在 Excel-VBA 的 IDE 中更改 Control-Y 行为

Eli*_*ahu 8 keyboard-shortcuts vba microsoft-excel-2010

Excel VBA 的 IDE 将 Control-y 注册为“剪切这行代码”。

相比之下,重做是由 Alt-e, R 完成的。

有什么方法可以改变这种行为并使 Control-y 成为更常见的重做?

(有关默认行为的更多信息,这里是一个链接:http : //www.pcreview.co.uk/threads/ctrl-y-in-vba-ide.2198613/

Eli*_*ahu 2

我编写的这个自动热键脚本似乎有效:

#IfWinActive ahk_class wndclass_desked_gsk

^y::
Send {escape}
Send !e;
Send r
Send {escape}
Send {escape}
return

#IfWinActive
Run Code Online (Sandbox Code Playgroud)